-- @generated by `buddy migrate:regenerate` — edits will be overwritten PRAGMA foreign_keys=OFF; BEGIN; CREATE TABLE "_qb_tmp_reviews" ( "id" INTEGER PRIMARY KEY AUTOINCREMENT, "rating" INTEGER, "title" TEXT, "content" TEXT, "is_verified_purchase" INTEGER default 0, "is_approved" INTEGER default 0, "is_featured" INTEGER default 0, "helpful_votes" INTEGER default 0, "unhelpful_votes" INTEGER default 0, "purchase_date" TEXT, "images" TEXT, "product_id" INTEGER REFERENCES "products"("id"), "customer_id" INTEGER REFERENCES "customers"("id"), "created_at" TEXT not null default CURRENT_TIMESTAMP, "updated_at" TEXT, "uuid" TEXT ); INSERT INTO "_qb_tmp_reviews" ("id", "rating", "title", "content", "is_verified_purchase", "is_approved", "is_featured", "helpful_votes", "unhelpful_votes", "purchase_date", "images", "product_id", "customer_id", "created_at", "updated_at", "uuid") SELECT "id", "rating", "title", "content", "is_verified_purchase", "is_approved", "is_featured", "helpful_votes", "unhelpful_votes", "purchase_date", "images", "product_id", "customer_id", "created_at", "updated_at", "uuid" FROM "reviews"; DROP TABLE "reviews"; ALTER TABLE "_qb_tmp_reviews" RENAME TO "reviews"; CREATE UNIQUE INDEX IF NOT EXISTS "reviews_uuid_unique" ON "reviews" ("uuid"); PRAGMA foreign_key_check; COMMIT; PRAGMA foreign_keys=ON;