UNPKG

@devx-commerce/plugin-product-reviews

Version:
16 lines 1.56 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Migration20250501112941 = void 0; const migrations_1 = require("@mikro-orm/migrations"); class Migration20250501112941 extends migrations_1.Migration { async up() { this.addSql(`alter table if exists "product_review" drop column if exists "status";`); this.addSql(`alter table if exists "product_review" add column if not exists "is_admin_verified" boolean not null default false;`); } async down() { this.addSql(`alter table if exists "product_review" drop column if exists "is_admin_verified";`); this.addSql(`alter table if exists "product_review" add column if not exists "status" text check ("status" in ('pending', 'approved', 'flagged')) not null default 'pending';`); } } exports.Migration20250501112941 = Migration20250501112941; //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTWlncmF0aW9uMjAyNTA1MDExMTI5NDEuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbW9kdWxlcy9wcm9kdWN0LXJldmlldy9taWdyYXRpb25zL01pZ3JhdGlvbjIwMjUwNTAxMTEyOTQxLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLHNEQUFrRDtBQUVsRCxNQUFhLHVCQUF3QixTQUFRLHNCQUFTO0lBRTNDLEtBQUssQ0FBQyxFQUFFO1FBQ2YsSUFBSSxDQUFDLE1BQU0sQ0FBQyx3RUFBd0UsQ0FBQyxDQUFDO1FBRXRGLElBQUksQ0FBQyxNQUFNLENBQUMscUhBQXFILENBQUMsQ0FBQztJQUNySSxDQUFDO0lBRVEsS0FBSyxDQUFDLElBQUk7UUFDakIsSUFBSSxDQUFDLE1BQU0sQ0FBQyxtRkFBbUYsQ0FBQyxDQUFDO1FBRWpHLElBQUksQ0FBQyxNQUFNLENBQUMsa0tBQWtLLENBQUMsQ0FBQztJQUNsTCxDQUFDO0NBRUY7QUFkRCwwREFjQyJ9