Initial commit

This commit is contained in:
2025-12-07 14:32:46 +00:00
commit 0a0969b8af
4726 changed files with 536089 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
exports.up = function (knex) {
return knex.schema.createTable('push_subscriptions', (t) => {
t.uuid('id')
.primary()
.defaultTo(knex.raw('gen_random_uuid()'));
// ✅ users.id é integer no teu caso
t.integer('user_id')
.notNullable()
.references('id')
.inTable('users')
.onDelete('CASCADE');
t.text('endpoint').notNullable().unique();
t.text('p256dh').notNullable();
t.text('auth').notNullable();
t.text('user_agent');
t.timestamp('created_at').defaultTo(knex.fn.now());
});
};
exports.down = function (knex) {
return knex.schema.dropTableIfExists('push_subscriptions');
};