feat: Create folder model

This commit is contained in:
Faruk AYDIN
2025-01-24 12:10:11 +01:00
parent 3961bb12cd
commit b76f7c0721
4 changed files with 101 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
export async function up(knex) {
return knex.schema.createTable('folders', (table) => {
table.uuid('id').primary().defaultTo(knex.raw('gen_random_uuid()'));
table.string('name');
table.uuid('user_id').references('id').inTable('users');
table.timestamps(true, true);
});
}
export async function down(knex) {
return knex.schema.dropTable('folders');
}