461 lines
11 KiB
JSON
461 lines
11 KiB
JSON
{
|
|
"id": "7bea20d0-987b-4a12-8446-a5966f2eb3e8",
|
|
"prevId": "00000000-0000-0000-0000-000000000000",
|
|
"version": "7",
|
|
"dialect": "postgresql",
|
|
"tables": {
|
|
"public.account": {
|
|
"name": "account",
|
|
"schema": "",
|
|
"columns": {
|
|
"userId": {
|
|
"name": "userId",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"type": {
|
|
"name": "type",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"provider": {
|
|
"name": "provider",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"providerAccountId": {
|
|
"name": "providerAccountId",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"refresh_token": {
|
|
"name": "refresh_token",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"access_token": {
|
|
"name": "access_token",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"expires_at": {
|
|
"name": "expires_at",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"token_type": {
|
|
"name": "token_type",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"scope": {
|
|
"name": "scope",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"id_token": {
|
|
"name": "id_token",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"session_state": {
|
|
"name": "session_state",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"account_userId_user_id_fk": {
|
|
"name": "account_userId_user_id_fk",
|
|
"tableFrom": "account",
|
|
"tableTo": "user",
|
|
"columnsFrom": [
|
|
"userId"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"account_provider_providerAccountId_pk": {
|
|
"name": "account_provider_providerAccountId_pk",
|
|
"columns": [
|
|
"provider",
|
|
"providerAccountId"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.session": {
|
|
"name": "session",
|
|
"schema": "",
|
|
"columns": {
|
|
"sessionToken": {
|
|
"name": "sessionToken",
|
|
"type": "text",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"userId": {
|
|
"name": "userId",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"expires": {
|
|
"name": "expires",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"session_userId_user_id_fk": {
|
|
"name": "session_userId_user_id_fk",
|
|
"tableFrom": "session",
|
|
"tableTo": "user",
|
|
"columnsFrom": [
|
|
"userId"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.user": {
|
|
"name": "user",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "text",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"email": {
|
|
"name": "email",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"emailVerified": {
|
|
"name": "emailVerified",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"image": {
|
|
"name": "image",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.verificationToken": {
|
|
"name": "verificationToken",
|
|
"schema": "",
|
|
"columns": {
|
|
"identifier": {
|
|
"name": "identifier",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"token": {
|
|
"name": "token",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"expires": {
|
|
"name": "expires",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {
|
|
"verificationToken_identifier_token_pk": {
|
|
"name": "verificationToken_identifier_token_pk",
|
|
"columns": [
|
|
"identifier",
|
|
"token"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.policy_settings": {
|
|
"name": "policy_settings",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "text",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"tenant_id": {
|
|
"name": "tenant_id",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"policy_name": {
|
|
"name": "policy_name",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"policy_type": {
|
|
"name": "policy_type",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"setting_name": {
|
|
"name": "setting_name",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"setting_value": {
|
|
"name": "setting_value",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"graph_policy_id": {
|
|
"name": "graph_policy_id",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"last_synced_at": {
|
|
"name": "last_synced_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"policy_settings_tenant_id_idx": {
|
|
"name": "policy_settings_tenant_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "tenant_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"policy_settings_setting_name_idx": {
|
|
"name": "policy_settings_setting_name_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "setting_name",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"policy_settings_upsert_idx": {
|
|
"name": "policy_settings_upsert_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "tenant_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "graph_policy_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "setting_name",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.subscriptions": {
|
|
"name": "subscriptions",
|
|
"schema": "",
|
|
"columns": {
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"stripe_customer_id": {
|
|
"name": "stripe_customer_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"stripe_subscription_id": {
|
|
"name": "stripe_subscription_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"stripe_price_id": {
|
|
"name": "stripe_price_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"stripe_current_period_end": {
|
|
"name": "stripe_current_period_end",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"subscriptions_user_id_user_id_fk": {
|
|
"name": "subscriptions_user_id_user_id_fk",
|
|
"tableFrom": "subscriptions",
|
|
"tableTo": "user",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"subscriptions_user_id_stripe_customer_id_pk": {
|
|
"name": "subscriptions_user_id_stripe_customer_id_pk",
|
|
"columns": [
|
|
"user_id",
|
|
"stripe_customer_id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {
|
|
"subscriptions_user_id_unique": {
|
|
"name": "subscriptions_user_id_unique",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"user_id"
|
|
]
|
|
},
|
|
"subscriptions_stripe_customer_id_unique": {
|
|
"name": "subscriptions_stripe_customer_id_unique",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"stripe_customer_id"
|
|
]
|
|
},
|
|
"subscriptions_stripe_subscription_id_unique": {
|
|
"name": "subscriptions_stripe_subscription_id_unique",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"stripe_subscription_id"
|
|
]
|
|
}
|
|
},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
}
|
|
},
|
|
"enums": {},
|
|
"schemas": {},
|
|
"sequences": {},
|
|
"roles": {},
|
|
"policies": {},
|
|
"views": {},
|
|
"_meta": {
|
|
"columns": {},
|
|
"schemas": {},
|
|
"tables": {}
|
|
}
|
|
} |