Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const up = function (knex) {
.onDelete('CASCADE')
.onUpdate('CASCADE')
.notNullable();
table.string('token').notNullable();
table.string('token', 64).notNullable();
table.boolean('is_used').defaultTo(false).notNullable();
table.timestamps(false, true);
table.primary(['user_id', 'farm_id']);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export const up = function (knex) {
return Promise.all([
knex.raw('ALTER TABLE "users" ALTER COLUMN user_id SET DEFAULT uuid_generate_v1();'),
knex.raw('ALTER TABLE "users" ALTER COLUMN user_id SET DEFAULT uuid_generate_v4();'),
]);
};

Expand Down