feat: Implement datastore built-in app

This commit is contained in:
Faruk AYDIN
2024-02-27 19:01:46 +01:00
parent 636870a075
commit bdb2f24a81
8 changed files with 172 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
export async function up(knex) {
return knex.schema.createTable('datastore', (table) => {
table.uuid('id').primary().defaultTo(knex.raw('gen_random_uuid()'));
table.string('key').notNullable();
table.string('value');
table.string('scope').notNullable();
table.uuid('scope_id').notNullable();
table.index(['key', 'scope', 'scope_id']);
table.timestamps(true, true);
});
}
export async function down(knex) {
return knex.schema.dropTable('datastore');
}