add support for SQLite as an alternative database backend
Some checks failed
Build & Publish Docker Image / build-and-push (push) Failing after 33s
Some checks failed
Build & Publish Docker Image / build-and-push (push) Failing after 33s
Implement SQLite support using the pure Go `modernc.org/sqlite` driver and update the migration system to handle driver-specific schemas. Users can now choose between MySQL and SQLite by setting the `DB_DRIVER` environment variable.
This commit is contained in:
23
internal/database/schema/mysql/migrations/tasks.json
Normal file
23
internal/database/schema/mysql/migrations/tasks.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"tasks": [
|
||||
{
|
||||
"id": "1_bug_reports",
|
||||
"sql_file": "1_bug_reports.sql",
|
||||
"description": "Add hostname, os_user columns and their indexes to bug_reports.",
|
||||
"conditions": [
|
||||
{ "type": "column_not_exists", "table": "bug_reports", "column": "hostname" },
|
||||
{ "type": "column_not_exists", "table": "bug_reports", "column": "os_user" },
|
||||
{ "type": "index_not_exists", "table": "bug_reports", "index": "idx_hostname" },
|
||||
{ "type": "index_not_exists", "table": "bug_reports", "index": "idx_os_user" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "2_users",
|
||||
"sql_file": "2_users.sql",
|
||||
"description": "Add enabled column to user table.",
|
||||
"conditions": [
|
||||
{ "type": "column_not_exists", "table": "user", "column": "enabled" }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user