819 lines
18 KiB
JSON
819 lines
18 KiB
JSON
{
|
|
"type": "base",
|
|
"version": "10",
|
|
"dialect": "postgres",
|
|
"id": "2041e3a9-973b-4348-98e7-0c5a0587d428",
|
|
"prevIds": [
|
|
"00000000-0000-0000-0000-000000000000"
|
|
],
|
|
"footprints": [
|
|
{
|
|
"statementType": "create_table",
|
|
"statementTarget": [
|
|
"table",
|
|
"public",
|
|
"account"
|
|
],
|
|
"writes": [
|
|
"s|tbl|public.account",
|
|
"n|tbl|public.account",
|
|
"e|tbl|public.account",
|
|
"n|rel|public.account",
|
|
"n|type|public.account",
|
|
"n|rel|public.account_pkey"
|
|
],
|
|
"reads": [
|
|
"n|sch|public"
|
|
]
|
|
},
|
|
{
|
|
"statementType": "create_table",
|
|
"statementTarget": [
|
|
"table",
|
|
"public",
|
|
"session"
|
|
],
|
|
"writes": [
|
|
"s|tbl|public.session",
|
|
"n|tbl|public.session",
|
|
"e|tbl|public.session",
|
|
"n|rel|public.session",
|
|
"n|type|public.session",
|
|
"n|rel|public.session_pkey",
|
|
"n|rel|public.session_token_key"
|
|
],
|
|
"reads": [
|
|
"n|sch|public"
|
|
]
|
|
},
|
|
{
|
|
"statementType": "create_table",
|
|
"statementTarget": [
|
|
"table",
|
|
"public",
|
|
"user"
|
|
],
|
|
"writes": [
|
|
"s|tbl|public.user",
|
|
"n|tbl|public.user",
|
|
"e|tbl|public.user",
|
|
"n|rel|public.user",
|
|
"n|type|public.user",
|
|
"n|rel|public.user_pkey",
|
|
"n|rel|public.user_email_key"
|
|
],
|
|
"reads": [
|
|
"n|sch|public"
|
|
]
|
|
},
|
|
{
|
|
"statementType": "create_table",
|
|
"statementTarget": [
|
|
"table",
|
|
"public",
|
|
"verification"
|
|
],
|
|
"writes": [
|
|
"s|tbl|public.verification",
|
|
"n|tbl|public.verification",
|
|
"e|tbl|public.verification",
|
|
"n|rel|public.verification",
|
|
"n|type|public.verification",
|
|
"n|rel|public.verification_pkey"
|
|
],
|
|
"reads": [
|
|
"n|sch|public"
|
|
]
|
|
},
|
|
{
|
|
"statementType": "create_index",
|
|
"statementTarget": [
|
|
"index",
|
|
"public",
|
|
"account",
|
|
"account_userId_idx"
|
|
],
|
|
"writes": [
|
|
"s|idx|public.account_userId_idx",
|
|
"n|idx|public.account_userId_idx",
|
|
"e|idx|public.account_userId_idx",
|
|
"n|rel|public.account_userId_idx"
|
|
],
|
|
"reads": [
|
|
"n|tbl|public.account",
|
|
"n|sch|public",
|
|
"n|col|public.account.user_id"
|
|
]
|
|
},
|
|
{
|
|
"statementType": "create_index",
|
|
"statementTarget": [
|
|
"index",
|
|
"public",
|
|
"session",
|
|
"session_userId_idx"
|
|
],
|
|
"writes": [
|
|
"s|idx|public.session_userId_idx",
|
|
"n|idx|public.session_userId_idx",
|
|
"e|idx|public.session_userId_idx",
|
|
"n|rel|public.session_userId_idx"
|
|
],
|
|
"reads": [
|
|
"n|tbl|public.session",
|
|
"n|sch|public",
|
|
"n|col|public.session.user_id"
|
|
]
|
|
},
|
|
{
|
|
"statementType": "create_index",
|
|
"statementTarget": [
|
|
"index",
|
|
"public",
|
|
"verification",
|
|
"verification_identifier_idx"
|
|
],
|
|
"writes": [
|
|
"s|idx|public.verification_identifier_idx",
|
|
"n|idx|public.verification_identifier_idx",
|
|
"e|idx|public.verification_identifier_idx",
|
|
"n|rel|public.verification_identifier_idx"
|
|
],
|
|
"reads": [
|
|
"n|tbl|public.verification",
|
|
"n|sch|public",
|
|
"n|col|public.verification.identifier"
|
|
]
|
|
},
|
|
{
|
|
"statementType": "create_fk",
|
|
"statementTarget": [
|
|
"table",
|
|
"public",
|
|
"account"
|
|
],
|
|
"writes": [
|
|
"s|fk|public.account.account_user_id_user_id_fkey",
|
|
"n|fk|public.account.account_user_id_user_id_fkey",
|
|
"e|fk|public.account.account_user_id_user_id_fkey",
|
|
"n|con|public.account.account_user_id_user_id_fkey"
|
|
],
|
|
"reads": [
|
|
"n|tbl|public.account",
|
|
"n|sch|public",
|
|
"n|tbl|public.user",
|
|
"n|sch|public",
|
|
"n|col|public.account.user_id",
|
|
"n|col|public.user.id",
|
|
"e|uniqueness|public.user.id"
|
|
]
|
|
},
|
|
{
|
|
"statementType": "create_fk",
|
|
"statementTarget": [
|
|
"table",
|
|
"public",
|
|
"session"
|
|
],
|
|
"writes": [
|
|
"s|fk|public.session.session_user_id_user_id_fkey",
|
|
"n|fk|public.session.session_user_id_user_id_fkey",
|
|
"e|fk|public.session.session_user_id_user_id_fkey",
|
|
"n|con|public.session.session_user_id_user_id_fkey"
|
|
],
|
|
"reads": [
|
|
"n|tbl|public.session",
|
|
"n|sch|public",
|
|
"n|tbl|public.user",
|
|
"n|sch|public",
|
|
"n|col|public.session.user_id",
|
|
"n|col|public.user.id",
|
|
"e|uniqueness|public.user.id"
|
|
]
|
|
}
|
|
],
|
|
"ddl": [
|
|
{
|
|
"schema": "public",
|
|
"name": "account",
|
|
"isRlsEnabled": false,
|
|
"entityType": "tables"
|
|
},
|
|
{
|
|
"schema": "public",
|
|
"name": "session",
|
|
"isRlsEnabled": false,
|
|
"entityType": "tables"
|
|
},
|
|
{
|
|
"schema": "public",
|
|
"name": "user",
|
|
"isRlsEnabled": false,
|
|
"entityType": "tables"
|
|
},
|
|
{
|
|
"schema": "public",
|
|
"name": "verification",
|
|
"isRlsEnabled": false,
|
|
"entityType": "tables"
|
|
},
|
|
{
|
|
"schema": "public",
|
|
"table": "account",
|
|
"name": "id",
|
|
"type": "text",
|
|
"typeSchema": null,
|
|
"notNull": true,
|
|
"dimensions": 0,
|
|
"default": null,
|
|
"generated": null,
|
|
"identity": null,
|
|
"entityType": "columns"
|
|
},
|
|
{
|
|
"schema": "public",
|
|
"table": "account",
|
|
"name": "account_id",
|
|
"type": "text",
|
|
"typeSchema": null,
|
|
"notNull": true,
|
|
"dimensions": 0,
|
|
"default": null,
|
|
"generated": null,
|
|
"identity": null,
|
|
"entityType": "columns"
|
|
},
|
|
{
|
|
"schema": "public",
|
|
"table": "account",
|
|
"name": "provider_id",
|
|
"type": "text",
|
|
"typeSchema": null,
|
|
"notNull": true,
|
|
"dimensions": 0,
|
|
"default": null,
|
|
"generated": null,
|
|
"identity": null,
|
|
"entityType": "columns"
|
|
},
|
|
{
|
|
"schema": "public",
|
|
"table": "account",
|
|
"name": "user_id",
|
|
"type": "text",
|
|
"typeSchema": null,
|
|
"notNull": true,
|
|
"dimensions": 0,
|
|
"default": null,
|
|
"generated": null,
|
|
"identity": null,
|
|
"entityType": "columns"
|
|
},
|
|
{
|
|
"schema": "public",
|
|
"table": "account",
|
|
"name": "access_token",
|
|
"type": "text",
|
|
"typeSchema": null,
|
|
"notNull": false,
|
|
"dimensions": 0,
|
|
"default": null,
|
|
"generated": null,
|
|
"identity": null,
|
|
"entityType": "columns"
|
|
},
|
|
{
|
|
"schema": "public",
|
|
"table": "account",
|
|
"name": "refresh_token",
|
|
"type": "text",
|
|
"typeSchema": null,
|
|
"notNull": false,
|
|
"dimensions": 0,
|
|
"default": null,
|
|
"generated": null,
|
|
"identity": null,
|
|
"entityType": "columns"
|
|
},
|
|
{
|
|
"schema": "public",
|
|
"table": "account",
|
|
"name": "id_token",
|
|
"type": "text",
|
|
"typeSchema": null,
|
|
"notNull": false,
|
|
"dimensions": 0,
|
|
"default": null,
|
|
"generated": null,
|
|
"identity": null,
|
|
"entityType": "columns"
|
|
},
|
|
{
|
|
"schema": "public",
|
|
"table": "account",
|
|
"name": "access_token_expires_at",
|
|
"type": "timestamp",
|
|
"typeSchema": null,
|
|
"notNull": false,
|
|
"dimensions": 0,
|
|
"default": null,
|
|
"generated": null,
|
|
"identity": null,
|
|
"entityType": "columns"
|
|
},
|
|
{
|
|
"schema": "public",
|
|
"table": "account",
|
|
"name": "refresh_token_expires_at",
|
|
"type": "timestamp",
|
|
"typeSchema": null,
|
|
"notNull": false,
|
|
"dimensions": 0,
|
|
"default": null,
|
|
"generated": null,
|
|
"identity": null,
|
|
"entityType": "columns"
|
|
},
|
|
{
|
|
"schema": "public",
|
|
"table": "account",
|
|
"name": "scope",
|
|
"type": "text",
|
|
"typeSchema": null,
|
|
"notNull": false,
|
|
"dimensions": 0,
|
|
"default": null,
|
|
"generated": null,
|
|
"identity": null,
|
|
"entityType": "columns"
|
|
},
|
|
{
|
|
"schema": "public",
|
|
"table": "account",
|
|
"name": "password",
|
|
"type": "text",
|
|
"typeSchema": null,
|
|
"notNull": false,
|
|
"dimensions": 0,
|
|
"default": null,
|
|
"generated": null,
|
|
"identity": null,
|
|
"entityType": "columns"
|
|
},
|
|
{
|
|
"schema": "public",
|
|
"table": "account",
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"typeSchema": null,
|
|
"notNull": true,
|
|
"dimensions": 0,
|
|
"default": "now()",
|
|
"generated": null,
|
|
"identity": null,
|
|
"entityType": "columns"
|
|
},
|
|
{
|
|
"schema": "public",
|
|
"table": "account",
|
|
"name": "updated_at",
|
|
"type": "timestamp",
|
|
"typeSchema": null,
|
|
"notNull": true,
|
|
"dimensions": 0,
|
|
"default": null,
|
|
"generated": null,
|
|
"identity": null,
|
|
"entityType": "columns"
|
|
},
|
|
{
|
|
"schema": "public",
|
|
"table": "session",
|
|
"name": "id",
|
|
"type": "text",
|
|
"typeSchema": null,
|
|
"notNull": true,
|
|
"dimensions": 0,
|
|
"default": null,
|
|
"generated": null,
|
|
"identity": null,
|
|
"entityType": "columns"
|
|
},
|
|
{
|
|
"schema": "public",
|
|
"table": "session",
|
|
"name": "expires_at",
|
|
"type": "timestamp",
|
|
"typeSchema": null,
|
|
"notNull": true,
|
|
"dimensions": 0,
|
|
"default": null,
|
|
"generated": null,
|
|
"identity": null,
|
|
"entityType": "columns"
|
|
},
|
|
{
|
|
"schema": "public",
|
|
"table": "session",
|
|
"name": "token",
|
|
"type": "text",
|
|
"typeSchema": null,
|
|
"notNull": true,
|
|
"dimensions": 0,
|
|
"default": null,
|
|
"generated": null,
|
|
"identity": null,
|
|
"entityType": "columns"
|
|
},
|
|
{
|
|
"schema": "public",
|
|
"table": "session",
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"typeSchema": null,
|
|
"notNull": true,
|
|
"dimensions": 0,
|
|
"default": "now()",
|
|
"generated": null,
|
|
"identity": null,
|
|
"entityType": "columns"
|
|
},
|
|
{
|
|
"schema": "public",
|
|
"table": "session",
|
|
"name": "updated_at",
|
|
"type": "timestamp",
|
|
"typeSchema": null,
|
|
"notNull": true,
|
|
"dimensions": 0,
|
|
"default": null,
|
|
"generated": null,
|
|
"identity": null,
|
|
"entityType": "columns"
|
|
},
|
|
{
|
|
"schema": "public",
|
|
"table": "session",
|
|
"name": "ip_address",
|
|
"type": "text",
|
|
"typeSchema": null,
|
|
"notNull": false,
|
|
"dimensions": 0,
|
|
"default": null,
|
|
"generated": null,
|
|
"identity": null,
|
|
"entityType": "columns"
|
|
},
|
|
{
|
|
"schema": "public",
|
|
"table": "session",
|
|
"name": "user_agent",
|
|
"type": "text",
|
|
"typeSchema": null,
|
|
"notNull": false,
|
|
"dimensions": 0,
|
|
"default": null,
|
|
"generated": null,
|
|
"identity": null,
|
|
"entityType": "columns"
|
|
},
|
|
{
|
|
"schema": "public",
|
|
"table": "session",
|
|
"name": "user_id",
|
|
"type": "text",
|
|
"typeSchema": null,
|
|
"notNull": true,
|
|
"dimensions": 0,
|
|
"default": null,
|
|
"generated": null,
|
|
"identity": null,
|
|
"entityType": "columns"
|
|
},
|
|
{
|
|
"schema": "public",
|
|
"table": "user",
|
|
"name": "id",
|
|
"type": "text",
|
|
"typeSchema": null,
|
|
"notNull": true,
|
|
"dimensions": 0,
|
|
"default": null,
|
|
"generated": null,
|
|
"identity": null,
|
|
"entityType": "columns"
|
|
},
|
|
{
|
|
"schema": "public",
|
|
"table": "user",
|
|
"name": "name",
|
|
"type": "text",
|
|
"typeSchema": null,
|
|
"notNull": true,
|
|
"dimensions": 0,
|
|
"default": null,
|
|
"generated": null,
|
|
"identity": null,
|
|
"entityType": "columns"
|
|
},
|
|
{
|
|
"schema": "public",
|
|
"table": "user",
|
|
"name": "email",
|
|
"type": "text",
|
|
"typeSchema": null,
|
|
"notNull": true,
|
|
"dimensions": 0,
|
|
"default": null,
|
|
"generated": null,
|
|
"identity": null,
|
|
"entityType": "columns"
|
|
},
|
|
{
|
|
"schema": "public",
|
|
"table": "user",
|
|
"name": "email_verified",
|
|
"type": "boolean",
|
|
"typeSchema": null,
|
|
"notNull": true,
|
|
"dimensions": 0,
|
|
"default": "false",
|
|
"generated": null,
|
|
"identity": null,
|
|
"entityType": "columns"
|
|
},
|
|
{
|
|
"schema": "public",
|
|
"table": "user",
|
|
"name": "image",
|
|
"type": "text",
|
|
"typeSchema": null,
|
|
"notNull": false,
|
|
"dimensions": 0,
|
|
"default": null,
|
|
"generated": null,
|
|
"identity": null,
|
|
"entityType": "columns"
|
|
},
|
|
{
|
|
"schema": "public",
|
|
"table": "user",
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"typeSchema": null,
|
|
"notNull": true,
|
|
"dimensions": 0,
|
|
"default": "now()",
|
|
"generated": null,
|
|
"identity": null,
|
|
"entityType": "columns"
|
|
},
|
|
{
|
|
"schema": "public",
|
|
"table": "user",
|
|
"name": "updated_at",
|
|
"type": "timestamp",
|
|
"typeSchema": null,
|
|
"notNull": true,
|
|
"dimensions": 0,
|
|
"default": "now()",
|
|
"generated": null,
|
|
"identity": null,
|
|
"entityType": "columns"
|
|
},
|
|
{
|
|
"schema": "public",
|
|
"table": "verification",
|
|
"name": "id",
|
|
"type": "text",
|
|
"typeSchema": null,
|
|
"notNull": true,
|
|
"dimensions": 0,
|
|
"default": null,
|
|
"generated": null,
|
|
"identity": null,
|
|
"entityType": "columns"
|
|
},
|
|
{
|
|
"schema": "public",
|
|
"table": "verification",
|
|
"name": "identifier",
|
|
"type": "text",
|
|
"typeSchema": null,
|
|
"notNull": true,
|
|
"dimensions": 0,
|
|
"default": null,
|
|
"generated": null,
|
|
"identity": null,
|
|
"entityType": "columns"
|
|
},
|
|
{
|
|
"schema": "public",
|
|
"table": "verification",
|
|
"name": "value",
|
|
"type": "text",
|
|
"typeSchema": null,
|
|
"notNull": true,
|
|
"dimensions": 0,
|
|
"default": null,
|
|
"generated": null,
|
|
"identity": null,
|
|
"entityType": "columns"
|
|
},
|
|
{
|
|
"schema": "public",
|
|
"table": "verification",
|
|
"name": "expires_at",
|
|
"type": "timestamp",
|
|
"typeSchema": null,
|
|
"notNull": true,
|
|
"dimensions": 0,
|
|
"default": null,
|
|
"generated": null,
|
|
"identity": null,
|
|
"entityType": "columns"
|
|
},
|
|
{
|
|
"schema": "public",
|
|
"table": "verification",
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"typeSchema": null,
|
|
"notNull": true,
|
|
"dimensions": 0,
|
|
"default": "now()",
|
|
"generated": null,
|
|
"identity": null,
|
|
"entityType": "columns"
|
|
},
|
|
{
|
|
"schema": "public",
|
|
"table": "verification",
|
|
"name": "updated_at",
|
|
"type": "timestamp",
|
|
"typeSchema": null,
|
|
"notNull": true,
|
|
"dimensions": 0,
|
|
"default": "now()",
|
|
"generated": null,
|
|
"identity": null,
|
|
"entityType": "columns"
|
|
},
|
|
{
|
|
"schema": "public",
|
|
"table": "account",
|
|
"name": "account_userId_idx",
|
|
"nameExplicit": true,
|
|
"columns": [
|
|
{
|
|
"value": "user_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nullsFirst": false,
|
|
"opclass": null
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"where": null,
|
|
"with": "",
|
|
"method": "btree",
|
|
"entityType": "indexes"
|
|
},
|
|
{
|
|
"schema": "public",
|
|
"table": "session",
|
|
"name": "session_userId_idx",
|
|
"nameExplicit": true,
|
|
"columns": [
|
|
{
|
|
"value": "user_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nullsFirst": false,
|
|
"opclass": null
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"where": null,
|
|
"with": "",
|
|
"method": "btree",
|
|
"entityType": "indexes"
|
|
},
|
|
{
|
|
"schema": "public",
|
|
"table": "verification",
|
|
"name": "verification_identifier_idx",
|
|
"nameExplicit": true,
|
|
"columns": [
|
|
{
|
|
"value": "identifier",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nullsFirst": false,
|
|
"opclass": null
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"where": null,
|
|
"with": "",
|
|
"method": "btree",
|
|
"entityType": "indexes"
|
|
},
|
|
{
|
|
"schema": "public",
|
|
"table": "account",
|
|
"name": "account_user_id_user_id_fkey",
|
|
"nameExplicit": false,
|
|
"columns": [
|
|
"user_id"
|
|
],
|
|
"schemaTo": "public",
|
|
"tableTo": "user",
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onUpdate": "NO ACTION",
|
|
"onDelete": "CASCADE",
|
|
"entityType": "fks"
|
|
},
|
|
{
|
|
"schema": "public",
|
|
"table": "session",
|
|
"name": "session_user_id_user_id_fkey",
|
|
"nameExplicit": false,
|
|
"columns": [
|
|
"user_id"
|
|
],
|
|
"schemaTo": "public",
|
|
"tableTo": "user",
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onUpdate": "NO ACTION",
|
|
"onDelete": "CASCADE",
|
|
"entityType": "fks"
|
|
},
|
|
{
|
|
"schema": "public",
|
|
"table": "account",
|
|
"name": "account_pkey",
|
|
"columns": [
|
|
"id"
|
|
],
|
|
"nameExplicit": false,
|
|
"entityType": "pks"
|
|
},
|
|
{
|
|
"schema": "public",
|
|
"table": "session",
|
|
"name": "session_pkey",
|
|
"columns": [
|
|
"id"
|
|
],
|
|
"nameExplicit": false,
|
|
"entityType": "pks"
|
|
},
|
|
{
|
|
"schema": "public",
|
|
"table": "user",
|
|
"name": "user_pkey",
|
|
"columns": [
|
|
"id"
|
|
],
|
|
"nameExplicit": false,
|
|
"entityType": "pks"
|
|
},
|
|
{
|
|
"schema": "public",
|
|
"table": "verification",
|
|
"name": "verification_pkey",
|
|
"columns": [
|
|
"id"
|
|
],
|
|
"nameExplicit": false,
|
|
"entityType": "pks"
|
|
},
|
|
{
|
|
"schema": "public",
|
|
"table": "session",
|
|
"name": "session_token_key",
|
|
"nameExplicit": false,
|
|
"columns": [
|
|
"token"
|
|
],
|
|
"nullsNotDistinct": false,
|
|
"entityType": "uniques"
|
|
},
|
|
{
|
|
"schema": "public",
|
|
"table": "user",
|
|
"name": "user_email_key",
|
|
"nameExplicit": false,
|
|
"columns": [
|
|
"email"
|
|
],
|
|
"nullsNotDistinct": false,
|
|
"entityType": "uniques"
|
|
}
|
|
]
|
|
} |