feat: add migration to mark userful instances installation completed

This commit is contained in:
Ali BARIN
2024-05-07 15:35:58 +00:00
parent 4d0481a3c6
commit b89ba1e623

View File

@@ -0,0 +1,17 @@
export async function up(knex) {
const users = await knex('users').limit(1);
// no user implies installation is not completed yet.
if (users.length === 0) return;
await knex('config').insert({
key: 'installation.completed',
value: {
data: true
}
});
};
export async function down(knex) {
await knex('config').where({ key: 'installation.completed' }).delete();
};