mirror of
https://github.com/aljazceru/cdk.git
synced 2025-12-18 13:14:59 +01:00
Add missing migrations for wallet and auth db
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
/// @generated
|
||||
/// Auto-generated by build.rs
|
||||
pub static MIGRATIONS: &[(&str, &str, &str)] = &[
|
||||
("sqlite", "1_fix_sqlx_migration.sql", include_str!(r#"./migrations/sqlite/1_fix_sqlx_migration.sql"#)),
|
||||
("sqlite", "20250109143347_init.sql", include_str!(r#"./migrations/sqlite/20250109143347_init.sql"#)),
|
||||
];
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
-- Migrate `_sqlx_migrations` to our new migration system
|
||||
CREATE TABLE IF NOT EXISTS _sqlx_migrations AS
|
||||
SELECT
|
||||
'' AS version,
|
||||
'' AS description,
|
||||
0 AS execution_time
|
||||
WHERE 0;
|
||||
|
||||
INSERT INTO migrations
|
||||
SELECT
|
||||
version || '_' || REPLACE(description, ' ', '_') || '.sql',
|
||||
execution_time
|
||||
FROM _sqlx_migrations
|
||||
WHERE EXISTS (
|
||||
SELECT 1
|
||||
FROM sqlite_master
|
||||
WHERE type = 'table' AND name = '_sqlx_migrations'
|
||||
);
|
||||
|
||||
DROP TABLE _sqlx_migrations;
|
||||
@@ -1,6 +1,7 @@
|
||||
/// @generated
|
||||
/// Auto-generated by build.rs
|
||||
pub static MIGRATIONS: &[(&str, &str, &str)] = &[
|
||||
("sqlite", "1_fix_sqlx_migration.sql", include_str!(r#"./migrations/sqlite/1_fix_sqlx_migration.sql"#)),
|
||||
("sqlite", "20240612132920_init.sql", include_str!(r#"./migrations/sqlite/20240612132920_init.sql"#)),
|
||||
("sqlite", "20240618200350_quote_state.sql", include_str!(r#"./migrations/sqlite/20240618200350_quote_state.sql"#)),
|
||||
("sqlite", "20240626091921_nut04_state.sql", include_str!(r#"./migrations/sqlite/20240626091921_nut04_state.sql"#)),
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
-- Migrate `_sqlx_migrations` to our new migration system
|
||||
CREATE TABLE IF NOT EXISTS _sqlx_migrations AS
|
||||
SELECT
|
||||
'' AS version,
|
||||
'' AS description,
|
||||
0 AS execution_time
|
||||
WHERE 0;
|
||||
|
||||
INSERT INTO migrations
|
||||
SELECT
|
||||
version || '_' || REPLACE(description, ' ', '_') || '.sql',
|
||||
execution_time
|
||||
FROM _sqlx_migrations
|
||||
WHERE EXISTS (
|
||||
SELECT 1
|
||||
FROM sqlite_master
|
||||
WHERE type = 'table' AND name = '_sqlx_migrations'
|
||||
);
|
||||
|
||||
DROP TABLE _sqlx_migrations;
|
||||
Reference in New Issue
Block a user