mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-08 14:43:24 +00:00
fix: missing PK on each column id
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user