fix: missing PK on each column id

This commit is contained in:
Sonny
2024-05-10 16:29:36 +02:00
committed by Sonny
parent 817b9baafc
commit 5f5eece627
4 changed files with 4 additions and 4 deletions

View File

@@ -5,7 +5,7 @@ export default class extends BaseSchema {
async up() {
this.schema.createTable(this.tableName, (table) => {
table.uuid('id').unique().notNullable();
table.uuid('id').primary().unique().notNullable();
table.string('email', 254).notNullable().unique();
table.string('name', 254).notNullable();

View File

@@ -8,7 +8,7 @@ export default class extends BaseSchema {
async up() {
this.schema.raw(`DROP TYPE IF EXISTS ${this.visibilityEnumName}`);
this.schema.createTable(this.tableName, (table) => {
table.uuid('id').unique().notNullable();
table.uuid('id').primary().unique().notNullable();
table.string('name', 254).notNullable();
table.string('description', 254);

View File

@@ -5,7 +5,7 @@ export default class extends BaseSchema {
async up() {
this.schema.createTable(this.tableName, (table) => {
table.uuid('id').unique().notNullable();
table.uuid('id').primary().unique().notNullable();
table.string('name', 254).notNullable();
table.string('description', 254);