refactor: convert IDs to uuid

This commit is contained in:
Ali BARIN
2022-03-03 21:42:16 +01:00
committed by Ömer Faruk Aydın
parent 0c183eeadd
commit 02af7948e5
17 changed files with 45 additions and 31 deletions

View File

@@ -2,7 +2,7 @@ import { Knex } from "knex";
export async function up(knex: Knex): Promise<void> {
return knex.schema.createTable('users', (table) => {
table.increments('id');
table.uuid('id').primary().defaultTo(knex.raw('gen_random_uuid()'));
table.string('email').unique().notNullable();
table.string('password').notNullable();