{ "version": "7", "dialect": "sqlite", "id": "627c7c0b-ac0a-4373-aee3-02e637e05ee6", "prevIds": [ "aefd1f03-d714-480c-9628-6877616b4425" ], "ddl": [ { "name": "actors", "entityType": "tables" }, { "name": "sessions", "entityType": "tables" }, { "name": "tickets", "entityType": "tables" }, { "name": "ticket_attachments", "entityType": "tables" }, { "name": "ticket_messages", "entityType": "tables" }, { "name": "ticket_participants", "entityType": "tables" }, { "type": "integer", "notNull": false, "autoincrement": true, "default": null, "generated": null, "name": "id", "entityType": "columns", "table": "actors" }, { "type": "text", "notNull": false, "autoincrement": false, "default": null, "generated": null, "name": "discord_id", "entityType": "columns", "table": "actors" }, { "type": "text", "notNull": false, "autoincrement": false, "default": null, "generated": null, "name": "display_name", "entityType": "columns", "table": "actors" }, { "type": "text", "notNull": false, "autoincrement": false, "default": null, "generated": null, "name": "username", "entityType": "columns", "table": "actors" }, { "type": "text", "notNull": false, "autoincrement": false, "default": null, "generated": null, "name": "avatar", "entityType": "columns", "table": "actors" }, { "type": "integer", "notNull": false, "autoincrement": false, "default": null, "generated": null, "name": "moderator", "entityType": "columns", "table": "actors" }, { "type": "integer", "notNull": true, "autoincrement": false, "default": null, "generated": null, "name": "created_at", "entityType": "columns", "table": "actors" }, { "type": "integer", "notNull": true, "autoincrement": false, "default": null, "generated": null, "name": "updated_at", "entityType": "columns", "table": "actors" }, { "type": "integer", "notNull": false, "autoincrement": false, "default": null, "generated": null, "name": "deleted_at", "entityType": "columns", "table": "actors" }, { "type": "text", "notNull": false, "autoincrement": false, "default": null, "generated": null, "name": "id", "entityType": "columns", "table": "sessions" }, { "type": "integer", "notNull": true, "autoincrement": false, "default": null, "generated": null, "name": "user_id", "entityType": "columns", "table": "sessions" }, { "type": "text", "notNull": true, "autoincrement": false, "default": null, "generated": null, "name": "access_token", "entityType": "columns", "table": "sessions" }, { "type": "text", "notNull": true, "autoincrement": false, "default": null, "generated": null, "name": "refresh_token", "entityType": "columns", "table": "sessions" }, { "type": "text", "notNull": false, "autoincrement": false, "default": null, "generated": null, "name": "scope", "entityType": "columns", "table": "sessions" }, { "type": "text", "notNull": false, "autoincrement": false, "default": null, "generated": null, "name": "token_type", "entityType": "columns", "table": "sessions" }, { "type": "integer", "notNull": true, "autoincrement": false, "default": null, "generated": null, "name": "expires_at", "entityType": "columns", "table": "sessions" }, { "type": "integer", "notNull": true, "autoincrement": false, "default": null, "generated": null, "name": "created_at", "entityType": "columns", "table": "sessions" }, { "type": "integer", "notNull": false, "autoincrement": true, "default": null, "generated": null, "name": "id", "entityType": "columns", "table": "tickets" }, { "type": "text", "notNull": true, "autoincrement": false, "default": null, "generated": null, "name": "anonymous_id", "entityType": "columns", "table": "tickets" }, { "type": "text", "notNull": true, "autoincrement": false, "default": null, "generated": null, "name": "status", "entityType": "columns", "table": "tickets" }, { "type": "text", "notNull": true, "autoincrement": false, "default": null, "generated": null, "name": "channel_id", "entityType": "columns", "table": "tickets" }, { "type": "text", "notNull": false, "autoincrement": false, "default": null, "generated": null, "name": "close_reason", "entityType": "columns", "table": "tickets" }, { "type": "text", "notNull": false, "autoincrement": false, "default": null, "generated": null, "name": "private_notes", "entityType": "columns", "table": "tickets" }, { "type": "integer", "notNull": true, "autoincrement": false, "default": null, "generated": null, "name": "opened_at", "entityType": "columns", "table": "tickets" }, { "type": "integer", "notNull": false, "autoincrement": false, "default": null, "generated": null, "name": "closed_at", "entityType": "columns", "table": "tickets" }, { "type": "integer", "notNull": true, "autoincrement": false, "default": null, "generated": null, "name": "opened_by", "entityType": "columns", "table": "tickets" }, { "type": "text", "notNull": false, "autoincrement": false, "default": null, "generated": null, "name": "open_reason", "entityType": "columns", "table": "tickets" }, { "type": "integer", "notNull": true, "autoincrement": false, "default": null, "generated": null, "name": "subject", "entityType": "columns", "table": "tickets" }, { "type": "integer", "notNull": false, "autoincrement": false, "default": null, "generated": null, "name": "claimed_by", "entityType": "columns", "table": "tickets" }, { "type": "integer", "notNull": false, "autoincrement": false, "default": null, "generated": null, "name": "claimed_at", "entityType": "columns", "table": "tickets" }, { "type": "integer", "notNull": false, "autoincrement": false, "default": null, "generated": null, "name": "thanked_at", "entityType": "columns", "table": "tickets" }, { "type": "integer", "notNull": false, "autoincrement": false, "default": null, "generated": null, "name": "warned_at", "entityType": "columns", "table": "tickets" }, { "type": "integer", "notNull": false, "autoincrement": false, "default": null, "generated": null, "name": "last_message_at", "entityType": "columns", "table": "tickets" }, { "type": "integer", "notNull": false, "autoincrement": false, "default": null, "generated": null, "name": "has_moderator_message", "entityType": "columns", "table": "tickets" }, { "type": "integer", "notNull": false, "autoincrement": false, "default": null, "generated": null, "name": "has_author_message", "entityType": "columns", "table": "tickets" }, { "type": "integer", "notNull": false, "autoincrement": true, "default": null, "generated": null, "name": "id", "entityType": "columns", "table": "ticket_attachments" }, { "type": "text", "notNull": true, "autoincrement": false, "default": null, "generated": null, "name": "public_id", "entityType": "columns", "table": "ticket_attachments" }, { "type": "integer", "notNull": false, "autoincrement": false, "default": null, "generated": null, "name": "message_id", "entityType": "columns", "table": "ticket_attachments" }, { "type": "integer", "notNull": true, "autoincrement": false, "default": null, "generated": null, "name": "ticket_id", "entityType": "columns", "table": "ticket_attachments" }, { "type": "integer", "notNull": true, "autoincrement": false, "default": null, "generated": null, "name": "actor_id", "entityType": "columns", "table": "ticket_attachments" }, { "type": "text", "notNull": true, "autoincrement": false, "default": null, "generated": null, "name": "file_name", "entityType": "columns", "table": "ticket_attachments" }, { "type": "text", "notNull": true, "autoincrement": false, "default": null, "generated": null, "name": "file_type", "entityType": "columns", "table": "ticket_attachments" }, { "type": "integer", "notNull": true, "autoincrement": false, "default": null, "generated": null, "name": "file_size", "entityType": "columns", "table": "ticket_attachments" }, { "type": "integer", "notNull": false, "autoincrement": true, "default": null, "generated": null, "name": "id", "entityType": "columns", "table": "ticket_messages" }, { "type": "text", "notNull": true, "autoincrement": false, "default": null, "generated": null, "name": "public_id", "entityType": "columns", "table": "ticket_messages" }, { "type": "text", "notNull": false, "autoincrement": false, "default": null, "generated": null, "name": "message_id", "entityType": "columns", "table": "ticket_messages" }, { "type": "integer", "notNull": true, "autoincrement": false, "default": null, "generated": null, "name": "ticket_id", "entityType": "columns", "table": "ticket_messages" }, { "type": "integer", "notNull": true, "autoincrement": false, "default": null, "generated": null, "name": "actor_id", "entityType": "columns", "table": "ticket_messages" }, { "type": "text", "notNull": true, "autoincrement": false, "default": null, "generated": null, "name": "content", "entityType": "columns", "table": "ticket_messages" }, { "type": "text", "notNull": true, "autoincrement": false, "default": null, "generated": null, "name": "actor_role", "entityType": "columns", "table": "ticket_messages" }, { "type": "integer", "notNull": true, "autoincrement": false, "default": null, "generated": null, "name": "created_at", "entityType": "columns", "table": "ticket_messages" }, { "type": "integer", "notNull": false, "autoincrement": false, "default": null, "generated": null, "name": "edited_at", "entityType": "columns", "table": "ticket_messages" }, { "type": "integer", "notNull": false, "autoincrement": false, "default": null, "generated": null, "name": "deleted_at", "entityType": "columns", "table": "ticket_messages" }, { "type": "integer", "notNull": false, "autoincrement": true, "default": null, "generated": null, "name": "id", "entityType": "columns", "table": "ticket_participants" }, { "type": "integer", "notNull": true, "autoincrement": false, "default": null, "generated": null, "name": "ticket_id", "entityType": "columns", "table": "ticket_participants" }, { "type": "integer", "notNull": true, "autoincrement": false, "default": null, "generated": null, "name": "actor_id", "entityType": "columns", "table": "ticket_participants" }, { "type": "text", "notNull": true, "autoincrement": false, "default": null, "generated": null, "name": "role", "entityType": "columns", "table": "ticket_participants" }, { "type": "text", "notNull": false, "autoincrement": false, "default": null, "generated": null, "name": "reason", "entityType": "columns", "table": "ticket_participants" }, { "type": "integer", "notNull": true, "autoincrement": false, "default": null, "generated": null, "name": "created_at", "entityType": "columns", "table": "ticket_participants" }, { "columns": [ "user_id" ], "tableTo": "actors", "columnsTo": [ "id" ], "onUpdate": "NO ACTION", "onDelete": "NO ACTION", "nameExplicit": false, "name": "fk_sessions_user_id_actors_id_fk", "entityType": "fks", "table": "sessions" }, { "columns": [ "opened_by" ], "tableTo": "actors", "columnsTo": [ "id" ], "onUpdate": "NO ACTION", "onDelete": "NO ACTION", "nameExplicit": false, "name": "fk_tickets_opened_by_actors_id_fk", "entityType": "fks", "table": "tickets" }, { "columns": [ "subject" ], "tableTo": "actors", "columnsTo": [ "id" ], "onUpdate": "NO ACTION", "onDelete": "NO ACTION", "nameExplicit": false, "name": "fk_tickets_subject_actors_id_fk", "entityType": "fks", "table": "tickets" }, { "columns": [ "claimed_by" ], "tableTo": "actors", "columnsTo": [ "id" ], "onUpdate": "NO ACTION", "onDelete": "NO ACTION", "nameExplicit": false, "name": "fk_tickets_claimed_by_actors_id_fk", "entityType": "fks", "table": "tickets" }, { "columns": [ "message_id" ], "tableTo": "ticket_messages", "columnsTo": [ "id" ], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "nameExplicit": false, "name": "fk_ticket_attachments_message_id_ticket_messages_id_fk", "entityType": "fks", "table": "ticket_attachments" }, { "columns": [ "ticket_id" ], "tableTo": "tickets", "columnsTo": [ "id" ], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "nameExplicit": false, "name": "fk_ticket_attachments_ticket_id_tickets_id_fk", "entityType": "fks", "table": "ticket_attachments" }, { "columns": [ "actor_id" ], "tableTo": "actors", "columnsTo": [ "id" ], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "nameExplicit": false, "name": "fk_ticket_attachments_actor_id_actors_id_fk", "entityType": "fks", "table": "ticket_attachments" }, { "columns": [ "ticket_id" ], "tableTo": "tickets", "columnsTo": [ "id" ], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "nameExplicit": false, "name": "fk_ticket_messages_ticket_id_tickets_id_fk", "entityType": "fks", "table": "ticket_messages" }, { "columns": [ "actor_id" ], "tableTo": "actors", "columnsTo": [ "id" ], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "nameExplicit": false, "name": "fk_ticket_messages_actor_id_actors_id_fk", "entityType": "fks", "table": "ticket_messages" }, { "columns": [ "ticket_id" ], "tableTo": "tickets", "columnsTo": [ "id" ], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "nameExplicit": false, "name": "fk_ticket_participants_ticket_id_tickets_id_fk", "entityType": "fks", "table": "ticket_participants" }, { "columns": [ "actor_id" ], "tableTo": "actors", "columnsTo": [ "id" ], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "nameExplicit": false, "name": "fk_ticket_participants_actor_id_actors_id_fk", "entityType": "fks", "table": "ticket_participants" }, { "columns": [ "id" ], "nameExplicit": false, "name": "actors_pk", "table": "actors", "entityType": "pks" }, { "columns": [ "id" ], "nameExplicit": false, "name": "sessions_pk", "table": "sessions", "entityType": "pks" }, { "columns": [ "id" ], "nameExplicit": false, "name": "tickets_pk", "table": "tickets", "entityType": "pks" }, { "columns": [ "id" ], "nameExplicit": false, "name": "ticket_attachments_pk", "table": "ticket_attachments", "entityType": "pks" }, { "columns": [ "id" ], "nameExplicit": false, "name": "ticket_messages_pk", "table": "ticket_messages", "entityType": "pks" }, { "columns": [ "id" ], "nameExplicit": false, "name": "ticket_participants_pk", "table": "ticket_participants", "entityType": "pks" }, { "columns": [ "discord_id" ], "nameExplicit": false, "name": "actors_discord_id_unique", "entityType": "uniques", "table": "actors" } ], "renames": [] }