diff --git a/app/Validators/guestbook/GuestValidator.ts b/app/Validators/guestbook/GuestValidator.ts index 5736ff1..6c075fc 100755 --- a/app/Validators/guestbook/GuestValidator.ts +++ b/app/Validators/guestbook/GuestValidator.ts @@ -6,11 +6,6 @@ export default class GuestValidator { } public schema = schema.create({ - user_id: schema.number([ - rules.required(), - rules.unique({table: 'golden_messages', column: 'user_id'}), - rules.exists({table: 'users', column: 'id'}) - ]), message: schema.string({}, [ rules.required() ]) diff --git a/database/migrations/1625330080117_guestbook_messages.ts b/database/migrations/1625330080117_guestbook_messages.ts index 7cc8f79..6c6a648 100644 --- a/database/migrations/1625330080117_guestbook_messages.ts +++ b/database/migrations/1625330080117_guestbook_messages.ts @@ -5,6 +5,7 @@ export default class GuestbookMessages extends BaseSchema { public async up() { await this.schema.table(this.tableName, (table) => { + table.dropColumn('message') table.text('message') }) }