Files
joel/src/database/drizzle/20260225201720_abnormal_legion/snapshot.json
2026-02-26 14:45:57 +01:00

844 lines
18 KiB
JSON

{
"version": "7",
"dialect": "sqlite",
"id": "cdc43d51-d185-45d7-924f-be733e9dbe13",
"prevIds": [
"661705d9-7768-4b73-b46d-a6d6fc87562f"
],
"ddl": [
{
"name": "bot_options",
"entityType": "tables"
},
{
"name": "guilds",
"entityType": "tables"
},
{
"name": "membership",
"entityType": "tables"
},
{
"name": "memories",
"entityType": "tables"
},
{
"name": "messages",
"entityType": "tables"
},
{
"name": "personalities",
"entityType": "tables"
},
{
"name": "users",
"entityType": "tables"
},
{
"name": "web_sessions",
"entityType": "tables"
},
{
"type": "text",
"notNull": false,
"autoincrement": false,
"default": null,
"generated": null,
"name": "guild_id",
"entityType": "columns",
"table": "bot_options"
},
{
"type": "text",
"notNull": false,
"autoincrement": false,
"default": null,
"generated": null,
"name": "active_personality_id",
"entityType": "columns",
"table": "bot_options"
},
{
"type": "text",
"notNull": false,
"autoincrement": false,
"default": "'free-will'",
"generated": null,
"name": "response_mode",
"entityType": "columns",
"table": "bot_options"
},
{
"type": "integer",
"notNull": false,
"autoincrement": false,
"default": "2",
"generated": null,
"name": "free_will_chance",
"entityType": "columns",
"table": "bot_options"
},
{
"type": "integer",
"notNull": false,
"autoincrement": false,
"default": "30",
"generated": null,
"name": "memory_chance",
"entityType": "columns",
"table": "bot_options"
},
{
"type": "integer",
"notNull": false,
"autoincrement": false,
"default": "0",
"generated": null,
"name": "mention_probability",
"entityType": "columns",
"table": "bot_options"
},
{
"type": "integer",
"notNull": false,
"autoincrement": false,
"default": "0",
"generated": null,
"name": "gif_search_enabled",
"entityType": "columns",
"table": "bot_options"
},
{
"type": "integer",
"notNull": false,
"autoincrement": false,
"default": "0",
"generated": null,
"name": "image_gen_enabled",
"entityType": "columns",
"table": "bot_options"
},
{
"type": "integer",
"notNull": false,
"autoincrement": false,
"default": "0",
"generated": null,
"name": "nsfw_image_enabled",
"entityType": "columns",
"table": "bot_options"
},
{
"type": "integer",
"notNull": false,
"autoincrement": false,
"default": "1",
"generated": null,
"name": "spontaneous_posts_enabled",
"entityType": "columns",
"table": "bot_options"
},
{
"type": "integer",
"notNull": false,
"autoincrement": false,
"default": null,
"generated": null,
"name": "spontaneous_interval_min_ms",
"entityType": "columns",
"table": "bot_options"
},
{
"type": "integer",
"notNull": false,
"autoincrement": false,
"default": null,
"generated": null,
"name": "spontaneous_interval_max_ms",
"entityType": "columns",
"table": "bot_options"
},
{
"type": "text",
"notNull": false,
"autoincrement": false,
"default": null,
"generated": null,
"name": "restricted_channel_id",
"entityType": "columns",
"table": "bot_options"
},
{
"type": "text",
"notNull": false,
"autoincrement": false,
"default": null,
"generated": null,
"name": "spontaneous_channel_ids",
"entityType": "columns",
"table": "bot_options"
},
{
"type": "text",
"notNull": false,
"autoincrement": false,
"default": "(current_timestamp)",
"generated": null,
"name": "updated_at",
"entityType": "columns",
"table": "bot_options"
},
{
"type": "text",
"notNull": false,
"autoincrement": false,
"default": null,
"generated": null,
"name": "id",
"entityType": "columns",
"table": "guilds"
},
{
"type": "text",
"notNull": false,
"autoincrement": false,
"default": null,
"generated": null,
"name": "name",
"entityType": "columns",
"table": "guilds"
},
{
"type": "text",
"notNull": false,
"autoincrement": false,
"default": null,
"generated": null,
"name": "user_id",
"entityType": "columns",
"table": "membership"
},
{
"type": "text",
"notNull": false,
"autoincrement": false,
"default": null,
"generated": null,
"name": "guild_id",
"entityType": "columns",
"table": "membership"
},
{
"type": "text",
"notNull": false,
"autoincrement": false,
"default": null,
"generated": null,
"name": "id",
"entityType": "columns",
"table": "memories"
},
{
"type": "text",
"notNull": true,
"autoincrement": false,
"default": null,
"generated": null,
"name": "content",
"entityType": "columns",
"table": "memories"
},
{
"type": "text",
"notNull": false,
"autoincrement": false,
"default": "'general'",
"generated": null,
"name": "category",
"entityType": "columns",
"table": "memories"
},
{
"type": "integer",
"notNull": false,
"autoincrement": false,
"default": "5",
"generated": null,
"name": "importance",
"entityType": "columns",
"table": "memories"
},
{
"type": "text",
"notNull": false,
"autoincrement": false,
"default": null,
"generated": null,
"name": "source_message_id",
"entityType": "columns",
"table": "memories"
},
{
"type": "text",
"notNull": false,
"autoincrement": false,
"default": null,
"generated": null,
"name": "user_id",
"entityType": "columns",
"table": "memories"
},
{
"type": "text",
"notNull": false,
"autoincrement": false,
"default": null,
"generated": null,
"name": "guild_id",
"entityType": "columns",
"table": "memories"
},
{
"type": "text",
"notNull": false,
"autoincrement": false,
"default": "(current_timestamp)",
"generated": null,
"name": "created_at",
"entityType": "columns",
"table": "memories"
},
{
"type": "text",
"notNull": false,
"autoincrement": false,
"default": null,
"generated": null,
"name": "last_accessed_at",
"entityType": "columns",
"table": "memories"
},
{
"type": "integer",
"notNull": false,
"autoincrement": false,
"default": "0",
"generated": null,
"name": "access_count",
"entityType": "columns",
"table": "memories"
},
{
"type": "text",
"notNull": false,
"autoincrement": false,
"default": null,
"generated": null,
"name": "embedding",
"entityType": "columns",
"table": "memories"
},
{
"type": "text",
"notNull": false,
"autoincrement": false,
"default": null,
"generated": null,
"name": "id",
"entityType": "columns",
"table": "messages"
},
{
"type": "text",
"notNull": false,
"autoincrement": false,
"default": null,
"generated": null,
"name": "content",
"entityType": "columns",
"table": "messages"
},
{
"type": "text",
"notNull": false,
"autoincrement": false,
"default": "(current_timestamp)",
"generated": null,
"name": "timestamp",
"entityType": "columns",
"table": "messages"
},
{
"type": "text",
"notNull": false,
"autoincrement": false,
"default": null,
"generated": null,
"name": "channel_id",
"entityType": "columns",
"table": "messages"
},
{
"type": "text",
"notNull": false,
"autoincrement": false,
"default": null,
"generated": null,
"name": "user_id",
"entityType": "columns",
"table": "messages"
},
{
"type": "text",
"notNull": false,
"autoincrement": false,
"default": null,
"generated": null,
"name": "guild_id",
"entityType": "columns",
"table": "messages"
},
{
"type": "text",
"notNull": false,
"autoincrement": false,
"default": null,
"generated": null,
"name": "id",
"entityType": "columns",
"table": "personalities"
},
{
"type": "text",
"notNull": false,
"autoincrement": false,
"default": null,
"generated": null,
"name": "guild_id",
"entityType": "columns",
"table": "personalities"
},
{
"type": "text",
"notNull": true,
"autoincrement": false,
"default": null,
"generated": null,
"name": "name",
"entityType": "columns",
"table": "personalities"
},
{
"type": "text",
"notNull": true,
"autoincrement": false,
"default": null,
"generated": null,
"name": "system_prompt",
"entityType": "columns",
"table": "personalities"
},
{
"type": "text",
"notNull": false,
"autoincrement": false,
"default": "(current_timestamp)",
"generated": null,
"name": "created_at",
"entityType": "columns",
"table": "personalities"
},
{
"type": "text",
"notNull": false,
"autoincrement": false,
"default": "(current_timestamp)",
"generated": null,
"name": "updated_at",
"entityType": "columns",
"table": "personalities"
},
{
"type": "text",
"notNull": false,
"autoincrement": false,
"default": null,
"generated": null,
"name": "id",
"entityType": "columns",
"table": "users"
},
{
"type": "text",
"notNull": false,
"autoincrement": false,
"default": null,
"generated": null,
"name": "name",
"entityType": "columns",
"table": "users"
},
{
"type": "integer",
"notNull": false,
"autoincrement": false,
"default": null,
"generated": null,
"name": "opt_out",
"entityType": "columns",
"table": "users"
},
{
"type": "text",
"notNull": false,
"autoincrement": false,
"default": null,
"generated": null,
"name": "id",
"entityType": "columns",
"table": "web_sessions"
},
{
"type": "text",
"notNull": true,
"autoincrement": false,
"default": null,
"generated": null,
"name": "user_id",
"entityType": "columns",
"table": "web_sessions"
},
{
"type": "text",
"notNull": true,
"autoincrement": false,
"default": null,
"generated": null,
"name": "access_token",
"entityType": "columns",
"table": "web_sessions"
},
{
"type": "text",
"notNull": false,
"autoincrement": false,
"default": null,
"generated": null,
"name": "refresh_token",
"entityType": "columns",
"table": "web_sessions"
},
{
"type": "text",
"notNull": true,
"autoincrement": false,
"default": null,
"generated": null,
"name": "expires_at",
"entityType": "columns",
"table": "web_sessions"
},
{
"type": "text",
"notNull": false,
"autoincrement": false,
"default": "(current_timestamp)",
"generated": null,
"name": "created_at",
"entityType": "columns",
"table": "web_sessions"
},
{
"columns": [
"guild_id"
],
"tableTo": "guilds",
"columnsTo": [
"id"
],
"onUpdate": "NO ACTION",
"onDelete": "NO ACTION",
"nameExplicit": false,
"name": "fk_bot_options_guild_id_guilds_id_fk",
"entityType": "fks",
"table": "bot_options"
},
{
"columns": [
"user_id"
],
"tableTo": "users",
"columnsTo": [
"id"
],
"onUpdate": "NO ACTION",
"onDelete": "NO ACTION",
"nameExplicit": false,
"name": "fk_memories_user_id_users_id_fk",
"entityType": "fks",
"table": "memories"
},
{
"columns": [
"guild_id"
],
"tableTo": "guilds",
"columnsTo": [
"id"
],
"onUpdate": "NO ACTION",
"onDelete": "NO ACTION",
"nameExplicit": false,
"name": "fk_memories_guild_id_guilds_id_fk",
"entityType": "fks",
"table": "memories"
},
{
"columns": [
"user_id"
],
"tableTo": "users",
"columnsTo": [
"id"
],
"onUpdate": "NO ACTION",
"onDelete": "NO ACTION",
"nameExplicit": false,
"name": "fk_messages_user_id_users_id_fk",
"entityType": "fks",
"table": "messages"
},
{
"columns": [
"guild_id"
],
"tableTo": "guilds",
"columnsTo": [
"id"
],
"onUpdate": "NO ACTION",
"onDelete": "NO ACTION",
"nameExplicit": false,
"name": "fk_messages_guild_id_guilds_id_fk",
"entityType": "fks",
"table": "messages"
},
{
"columns": [
"guild_id"
],
"tableTo": "guilds",
"columnsTo": [
"id"
],
"onUpdate": "NO ACTION",
"onDelete": "NO ACTION",
"nameExplicit": false,
"name": "fk_personalities_guild_id_guilds_id_fk",
"entityType": "fks",
"table": "personalities"
},
{
"columns": [
"guild_id"
],
"nameExplicit": false,
"name": "bot_options_pk",
"table": "bot_options",
"entityType": "pks"
},
{
"columns": [
"id"
],
"nameExplicit": false,
"name": "guilds_pk",
"table": "guilds",
"entityType": "pks"
},
{
"columns": [
"id"
],
"nameExplicit": false,
"name": "memories_pk",
"table": "memories",
"entityType": "pks"
},
{
"columns": [
"id"
],
"nameExplicit": false,
"name": "messages_pk",
"table": "messages",
"entityType": "pks"
},
{
"columns": [
"id"
],
"nameExplicit": false,
"name": "personalities_pk",
"table": "personalities",
"entityType": "pks"
},
{
"columns": [
"id"
],
"nameExplicit": false,
"name": "users_pk",
"table": "users",
"entityType": "pks"
},
{
"columns": [
"id"
],
"nameExplicit": false,
"name": "web_sessions_pk",
"table": "web_sessions",
"entityType": "pks"
},
{
"columns": [
{
"value": "user_id",
"isExpression": false
},
{
"value": "guild_id",
"isExpression": false
}
],
"isUnique": false,
"where": null,
"origin": "manual",
"name": "user_guild_idx",
"entityType": "indexes",
"table": "membership"
},
{
"columns": [
{
"value": "user_id",
"isExpression": false
}
],
"isUnique": false,
"where": null,
"origin": "manual",
"name": "memory_user_idx",
"entityType": "indexes",
"table": "memories"
},
{
"columns": [
{
"value": "guild_id",
"isExpression": false
}
],
"isUnique": false,
"where": null,
"origin": "manual",
"name": "memory_guild_idx",
"entityType": "indexes",
"table": "memories"
},
{
"columns": [
{
"value": "user_id",
"isExpression": false
},
{
"value": "importance",
"isExpression": false
}
],
"isUnique": false,
"where": null,
"origin": "manual",
"name": "memory_user_importance_idx",
"entityType": "indexes",
"table": "memories"
},
{
"columns": [
{
"value": "category",
"isExpression": false
}
],
"isUnique": false,
"where": null,
"origin": "manual",
"name": "memory_category_idx",
"entityType": "indexes",
"table": "memories"
},
{
"columns": [
{
"value": "user_id",
"isExpression": false
},
{
"value": "category",
"isExpression": false
}
],
"isUnique": false,
"where": null,
"origin": "manual",
"name": "memory_user_category_idx",
"entityType": "indexes",
"table": "memories"
},
{
"columns": [
{
"value": "channel_id",
"isExpression": false
},
{
"value": "timestamp",
"isExpression": false
}
],
"isUnique": false,
"where": null,
"origin": "manual",
"name": "channel_timestamp_idx",
"entityType": "indexes",
"table": "messages"
},
{
"columns": [
{
"value": "guild_id",
"isExpression": false
}
],
"isUnique": false,
"where": null,
"origin": "manual",
"name": "personality_guild_idx",
"entityType": "indexes",
"table": "personalities"
},
{
"columns": [
"user_id",
"guild_id"
],
"nameExplicit": true,
"name": "user_guild_unique",
"entityType": "uniques",
"table": "membership"
}
],
"renames": []
}