fix: change order keys for clickhouse tables
* wip * rename * fix: minor things before merging new order keys * fix: add maintenance mode * fix: update order by for session and events * fix: remove properties from sessions and final migration test * fix: set end date on migrations * fix: comments
This commit is contained in:
committed by
GitHub
parent
3b61b28290
commit
d7c6e88adc
@@ -10,6 +10,7 @@ import {
|
||||
getIsCluster,
|
||||
getIsDry,
|
||||
getIsSelfHosting,
|
||||
getShouldIgnoreRecord,
|
||||
printBoxMessage,
|
||||
} from './helpers';
|
||||
|
||||
@@ -55,8 +56,12 @@ async function migrate() {
|
||||
]);
|
||||
|
||||
if (!getIsSelfHosting()) {
|
||||
printBoxMessage('🕒 Migrations starts in 10 seconds', []);
|
||||
await new Promise((resolve) => setTimeout(resolve, 10000));
|
||||
if (!getIsDry()) {
|
||||
printBoxMessage('🕒 Migrations starts in 10 seconds', []);
|
||||
await new Promise((resolve) => setTimeout(resolve, 10000));
|
||||
} else {
|
||||
printBoxMessage('🕒 Migrations starts now (dry run)', []);
|
||||
}
|
||||
}
|
||||
|
||||
if (migration) {
|
||||
@@ -81,7 +86,7 @@ async function runMigration(migrationsDir: string, file: string) {
|
||||
try {
|
||||
const migration = await import(path.join(migrationsDir, file));
|
||||
await migration.up();
|
||||
if (!getIsDry()) {
|
||||
if (!getIsDry() && !getShouldIgnoreRecord()) {
|
||||
await db.codeMigration.upsert({
|
||||
where: {
|
||||
name: file,
|
||||
|
||||
Reference in New Issue
Block a user