chore: remove useless migration normalization
Some checks failed
Release Workflow / determine-release-type (push) Has been cancelled
Release Workflow / checks (push) Has been cancelled
Release Workflow / e2e-tests (push) Has been cancelled
Release Workflow / build-images (push) Has been cancelled
Release Workflow / publish-release (push) Has been cancelled
Some checks failed
Release Workflow / determine-release-type (push) Has been cancelled
Release Workflow / checks (push) Has been cancelled
Release Workflow / e2e-tests (push) Has been cancelled
Release Workflow / build-images (push) Has been cancelled
Release Workflow / publish-release (push) Has been cancelled
This commit is contained in:
parent
1321b15c0d
commit
705f5c75cb
1 changed files with 0 additions and 16 deletions
|
|
@ -19,20 +19,6 @@ export const db = drizzle({ client: sqlite, relations, schema });
|
|||
|
||||
let migrationsPromise: Promise<void> | undefined;
|
||||
|
||||
const normalizeLegacyMigrationTimestamps = () => {
|
||||
const drizzleMigrationsTableExists = sqlite
|
||||
.query("SELECT 1 FROM sqlite_master WHERE type = 'table' AND name = '__drizzle_migrations' LIMIT 1")
|
||||
.get();
|
||||
|
||||
if (!drizzleMigrationsTableExists) {
|
||||
return;
|
||||
}
|
||||
|
||||
sqlite.run(
|
||||
"UPDATE __drizzle_migrations SET created_at = CAST(created_at / 1000 AS INTEGER) * 1000 WHERE created_at % 1000 != 0",
|
||||
);
|
||||
};
|
||||
|
||||
const runMigrations = async () => {
|
||||
let migrationsFolder: string;
|
||||
|
||||
|
|
@ -44,8 +30,6 @@ const runMigrations = async () => {
|
|||
migrationsFolder = path.join(process.cwd(), "app", "drizzle");
|
||||
}
|
||||
|
||||
normalizeLegacyMigrationTimestamps();
|
||||
|
||||
migrate(db, { migrationsFolder });
|
||||
|
||||
sqlite.run("PRAGMA foreign_keys = ON;");
|
||||
|
|
|
|||
Loading…
Reference in a new issue