Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emumetの認可関連のDBテーブルを更新 #16

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 18 additions & 19 deletions packages/document/dbml/emumet.dbml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Table accounts {
deleted_at TIMESTAMPTZ
version UUID [not null]
nanoid TEXT [not null, unique]
created_at TIMESTAMPTZ [not null]
}

Table remote_accounts {
Expand Down Expand Up @@ -53,31 +54,29 @@ Table metadatas {

Ref: metadatas.account_id > accounts.id [delete: cascade]

Table stellar_hosts {
Table auth_hosts {
id UUID [not null, pk]
url TEXT [not null, unique]
}

Table stellar_accounts {
Table auth_accounts {
id UUID [not null, pk]
host_id UUID [not null]
client_id TEXT [not null]
access_token TEXT [not null]
refresh_token TEXT [not null]
version UUID [not null]
}

Ref: stellar_accounts.host_id > stellar_hosts.id [delete: cascade]
Ref: auth_accounts.host_id > auth_hosts.id [delete: cascade]

Table stellar_emumet_accounts {
Table auth_emumet_accounts {
emumet_id UUID [not null]
stellar_id UUID [not null, ref: > stellar_accounts.id]
auth_id UUID [not null, ref: > auth_accounts.id]
Indexes {
(emumet_id, stellar_id) [pk]
(emumet_id, auth_id) [pk]
}
}

Ref: stellar_emumet_accounts.emumet_id > accounts.id [delete: cascade]
Ref: auth_emumet_accounts.emumet_id > accounts.id [delete: cascade]

Table follows {
id UUID [not null, pk]
Expand Down Expand Up @@ -107,14 +106,14 @@ Table images {
// }
//
// Table moderators {
// stellar_id UUID [not null, pk, ref: > stellar_accounts.id]
// auth_id UUID [not null, pk, ref: > auth_accounts.id]
// role_id UUID [not null, pk, ref: > moderator_roles.id]
// }
//
// Table account_reports {
// id UUID [not null, pk]
// target_id UUID [not null, ref: > accounts.id]
// reported_id UUID [not null, ref: > stellar_accounts.id]
// reported_id UUID [not null, ref: > auth_accounts.id]
// type TEXT [not null]
// comment TEXT [not null]
// created_at TIMESTAMPTZ [not null]
Expand All @@ -125,7 +124,7 @@ Table images {
// Table account_moderations {
// id UUID [not null, pk]
// target_id UUID [not null, ref: > accounts.id]
// moderator_id UUID [not null, ref: > stellar_accounts.id]
// moderator_id UUID [not null, ref: > auth_accounts.id]
// type TEXT [not null]
// comment TEXT [not null]
// created_at TIMESTAMPTZ [not null]
Expand All @@ -139,17 +138,17 @@ Table images {
// }
// }
//
// Table stellar_account_moderations {
// Table auth_account_moderations {
// id UUID [not null, pk]
// target_id UUID [not null, ref: > stellar_accounts.id]
// moderator_id UUID [not null, ref: > stellar_accounts.id]
// target_id UUID [not null, ref: > auth_accounts.id]
// moderator_id UUID [not null, ref: > auth_accounts.id]
// type TEXT [not null]
// comment TEXT [not null]
// created_at TIMESTAMPTZ [not null]
// closed_at TIMESTAMPTZ
// }
// Table stellar_account_moderation_reports {
// moderation_id UUID [not null, ref: > stellar_account_moderations.id]
// Table auth_account_moderation_reports {
// moderation_id UUID [not null, ref: > auth_account_moderations.id]
// report_id UUID [not null, ref: > account_reports.id]
// Indexes {
// (moderation_id, report_id) [pk]
Expand All @@ -158,8 +157,8 @@ Table images {
//
// Table host_moderations {
// id UUID [not null, pk]
// host_id UUID [not null, ref: > stellar_hosts.id]
// moderator_id UUID [not null, ref: > stellar_accounts.id]
// host_id UUID [not null, ref: > auth_hosts.id]
// moderator_id UUID [not null, ref: > auth_accounts.id]
// type TEXT [not null]
// comment TEXT [not null]
// created_at TIMESTAMPTZ [not null]
Expand Down
Loading
Loading