{ "version": "6", "dialect": "sqlite", "id": "1455820b-8aec-4fcb-9790-c7d9f1fd908c", "prevId": "42951f9a-6025-4e73-9155-764d25514ba8", "tables": { "connection_credentials": { "name": "connection_credentials", "columns": { "connection_id": { "name": "connection_id", "type": "text", "primaryKey": true, "notNull": true, "autoincrement": false }, "encrypted_token": { "name": "encrypted_token", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "app_id": { "name": "app_id", "type": "text", "primaryKey": false, "notNull": false, "autoincrement": false }, "updated_at": { "name": "updated_at", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false } }, "indexes": {}, "foreignKeys": { "connection_credentials_connection_id_connections_id_fk": { "name": "connection_credentials_connection_id_connections_id_fk", "tableFrom": "connection_credentials", "tableTo": "connections", "columnsFrom": ["connection_id"], "columnsTo": ["id"], "onDelete": "cascade", "onUpdate": "no action" }, "connection_credentials_app_id_oauth_apps_id_fk": { "name": "connection_credentials_app_id_oauth_apps_id_fk", "tableFrom": "connection_credentials", "tableTo": "oauth_apps", "columnsFrom": ["app_id"], "columnsTo": ["id"], "onDelete": "restrict", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": {} }, "connections": { "name": "connections", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true, "autoincrement": false }, "platform": { "name": "platform", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "origin": { "name": "origin", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "account_id": { "name": "account_id", "type": "text", "primaryKey": false, "notNull": false, "autoincrement": false }, "relay_profile": { "name": "relay_profile", "type": "text", "primaryKey": false, "notNull": false, "autoincrement": false }, "display_name": { "name": "display_name", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "status": { "name": "status", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "created_at": { "name": "created_at", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false }, "updated_at": { "name": "updated_at", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false } }, "indexes": { "connections_account": { "name": "connections_account", "columns": ["platform", "origin", "account_id"], "isUnique": true }, "connections_relay_profile": { "name": "connections_relay_profile", "columns": ["origin", "relay_profile"], "isUnique": true } }, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": {} }, "deck_columns": { "name": "deck_columns", "columns": { "id": { "name": "id", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "deck_id": { "name": "deck_id", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "position": { "name": "position", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false }, "connection_id": { "name": "connection_id", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "title": { "name": "title", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "source": { "name": "source", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false } }, "indexes": { "deck_columns_position": { "name": "deck_columns_position", "columns": ["deck_id", "position"], "isUnique": true } }, "foreignKeys": { "deck_columns_deck_id_decks_id_fk": { "name": "deck_columns_deck_id_decks_id_fk", "tableFrom": "deck_columns", "tableTo": "decks", "columnsFrom": ["deck_id"], "columnsTo": ["id"], "onDelete": "cascade", "onUpdate": "no action" }, "deck_columns_connection_id_connections_id_fk": { "name": "deck_columns_connection_id_connections_id_fk", "tableFrom": "deck_columns", "tableTo": "connections", "columnsFrom": ["connection_id"], "columnsTo": ["id"], "onDelete": "restrict", "onUpdate": "no action" } }, "compositePrimaryKeys": { "deck_columns_deck_id_id_pk": { "columns": ["deck_id", "id"], "name": "deck_columns_deck_id_id_pk" } }, "uniqueConstraints": {}, "checkConstraints": { "deck_columns_valid_position": { "name": "deck_columns_valid_position", "value": "\"deck_columns\".\"position\" >= 0" } } }, "decks": { "name": "decks", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true, "autoincrement": false }, "title": { "name": "title", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "revision": { "name": "revision", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false, "default": 1 }, "created_at": { "name": "created_at", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false }, "updated_at": { "name": "updated_at", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": { "decks_positive_revision": { "name": "decks_positive_revision", "value": "\"decks\".\"revision\" >= 1" } } }, "oauth_apps": { "name": "oauth_apps", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true, "autoincrement": false }, "origin": { "name": "origin", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "redirect_uri": { "name": "redirect_uri", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "scopes": { "name": "scopes", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "client_id": { "name": "client_id", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "encrypted_client_secret": { "name": "encrypted_client_secret", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "created_at": { "name": "created_at", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false } }, "indexes": { "oauth_apps_configuration": { "name": "oauth_apps_configuration", "columns": ["origin", "redirect_uri", "scopes"], "isUnique": true } }, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": {} }, "oauth_attempts": { "name": "oauth_attempts", "columns": { "state_hash": { "name": "state_hash", "type": "text", "primaryKey": true, "notNull": true, "autoincrement": false }, "browser_hash": { "name": "browser_hash", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "app_id": { "name": "app_id", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "encrypted_verifier": { "name": "encrypted_verifier", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "connection_id": { "name": "connection_id", "type": "text", "primaryKey": false, "notNull": false, "autoincrement": false }, "expires_at": { "name": "expires_at", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false }, "consumed_at": { "name": "consumed_at", "type": "integer", "primaryKey": false, "notNull": false, "autoincrement": false } }, "indexes": {}, "foreignKeys": { "oauth_attempts_app_id_oauth_apps_id_fk": { "name": "oauth_attempts_app_id_oauth_apps_id_fk", "tableFrom": "oauth_attempts", "tableTo": "oauth_apps", "columnsFrom": ["app_id"], "columnsTo": ["id"], "onDelete": "cascade", "onUpdate": "no action" }, "oauth_attempts_connection_id_connections_id_fk": { "name": "oauth_attempts_connection_id_connections_id_fk", "tableFrom": "oauth_attempts", "tableTo": "connections", "columnsFrom": ["connection_id"], "columnsTo": ["id"], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": {} } }, "views": {}, "enums": {}, "_meta": { "schemas": {}, "tables": {}, "columns": {} }, "internal": { "indexes": {} } }