import { Migration } from '@mikro-orm/migrations';

export class Migration20240508201511 extends Migration {
    async up(): Promise<void> {
        this.addSql(
            'create table "3rapp_posts" ("id" uuid not null, "title" varchar(255) not null, "body" text not null, "keywords" text[] null, "created_at" timestamptz not null, "updated_at" timestamptz not null, constraint "3rapp_posts_pkey" primary key ("id"));',
        );
        this.addSql('create index "3rapp_posts_title_index" on "3rapp_posts" ("title");');
    }

    async down(): Promise<void> {
        this.addSql('drop table if exists "3rapp_posts" cascade;');
    }
}
