/*
  Warnings:

  - You are about to drop the column `featured` on the `Publication` table. All the data in the column will be lost.

*/
-- RedefineTables
PRAGMA defer_foreign_keys=ON;
PRAGMA foreign_keys=OFF;
CREATE TABLE "new_Member" (
    "id" TEXT NOT NULL PRIMARY KEY,
    "name" TEXT NOT NULL,
    "nameEn" TEXT,
    "photo" TEXT,
    "role" TEXT NOT NULL,
    "bio" TEXT,
    "bioEn" TEXT,
    "interest" TEXT,
    "interestEn" TEXT,
    "email" TEXT,
    "homepage" TEXT,
    "github" TEXT,
    "scholar" TEXT,
    "cvUrl" TEXT,
    "authorAliases" TEXT NOT NULL DEFAULT '[]',
    "education" TEXT NOT NULL DEFAULT '[]',
    "educationEn" TEXT NOT NULL DEFAULT '[]',
    "awards" TEXT NOT NULL DEFAULT '[]',
    "awardsEn" TEXT NOT NULL DEFAULT '[]',
    "sortOrder" INTEGER NOT NULL DEFAULT 0,
    "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
    "updatedAt" DATETIME NOT NULL
);
INSERT INTO "new_Member" ("authorAliases", "awards", "bio", "createdAt", "cvUrl", "education", "email", "github", "homepage", "id", "interest", "name", "nameEn", "photo", "role", "scholar", "sortOrder", "updatedAt") SELECT "authorAliases", "awards", "bio", "createdAt", "cvUrl", "education", "email", "github", "homepage", "id", "interest", "name", "nameEn", "photo", "role", "scholar", "sortOrder", "updatedAt" FROM "Member";
DROP TABLE "Member";
ALTER TABLE "new_Member" RENAME TO "Member";
CREATE TABLE "new_Post" (
    "id" TEXT NOT NULL PRIMARY KEY,
    "title" TEXT NOT NULL,
    "titleEn" TEXT NOT NULL DEFAULT '',
    "content" TEXT NOT NULL,
    "contentEn" TEXT NOT NULL DEFAULT '',
    "category" TEXT NOT NULL DEFAULT 'news',
    "published" BOOLEAN NOT NULL DEFAULT false,
    "pinned" BOOLEAN NOT NULL DEFAULT false,
    "thumbnail" TEXT,
    "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
    "updatedAt" DATETIME NOT NULL
);
INSERT INTO "new_Post" ("category", "content", "createdAt", "id", "pinned", "published", "thumbnail", "title", "updatedAt") SELECT "category", "content", "createdAt", "id", "pinned", "published", "thumbnail", "title", "updatedAt" FROM "Post";
DROP TABLE "Post";
ALTER TABLE "new_Post" RENAME TO "Post";
CREATE TABLE "new_Project" (
    "id" TEXT NOT NULL PRIMARY KEY,
    "title" TEXT NOT NULL,
    "titleEn" TEXT NOT NULL DEFAULT '',
    "description" TEXT NOT NULL,
    "descriptionEn" TEXT NOT NULL DEFAULT '',
    "participants" TEXT,
    "status" TEXT NOT NULL DEFAULT 'ongoing',
    "featured" BOOLEAN NOT NULL DEFAULT false,
    "imageUrl" TEXT,
    "demoUrl" TEXT,
    "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
    "updatedAt" DATETIME NOT NULL
);
INSERT INTO "new_Project" ("createdAt", "demoUrl", "description", "featured", "id", "imageUrl", "participants", "status", "title", "updatedAt") SELECT "createdAt", "demoUrl", "description", "featured", "id", "imageUrl", "participants", "status", "title", "updatedAt" FROM "Project";
DROP TABLE "Project";
ALTER TABLE "new_Project" RENAME TO "Project";
CREATE TABLE "new_Publication" (
    "id" TEXT NOT NULL PRIMARY KEY,
    "title" TEXT NOT NULL,
    "authors" TEXT NOT NULL,
    "venue" TEXT NOT NULL,
    "year" INTEGER NOT NULL,
    "tags" TEXT NOT NULL DEFAULT '[]',
    "url" TEXT,
    "pdfUrl" TEXT,
    "doiUrl" TEXT,
    "projectUrl" TEXT,
    "codeUrl" TEXT,
    "videoUrl" TEXT,
    "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
    "updatedAt" DATETIME NOT NULL
);
INSERT INTO "new_Publication" ("authors", "codeUrl", "createdAt", "doiUrl", "id", "pdfUrl", "projectUrl", "title", "updatedAt", "url", "venue", "videoUrl", "year") SELECT "authors", "codeUrl", "createdAt", "doiUrl", "id", "pdfUrl", "projectUrl", "title", "updatedAt", "url", "venue", "videoUrl", "year" FROM "Publication";
DROP TABLE "Publication";
ALTER TABLE "new_Publication" RENAME TO "Publication";
CREATE TABLE "new_Research" (
    "id" TEXT NOT NULL PRIMARY KEY,
    "title" TEXT NOT NULL,
    "titleEn" TEXT NOT NULL DEFAULT '',
    "description" TEXT NOT NULL,
    "descriptionEn" TEXT NOT NULL DEFAULT '',
    "icon" TEXT,
    "sortOrder" INTEGER NOT NULL DEFAULT 0,
    "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
    "updatedAt" DATETIME NOT NULL
);
INSERT INTO "new_Research" ("createdAt", "description", "icon", "id", "sortOrder", "title", "updatedAt") SELECT "createdAt", "description", "icon", "id", "sortOrder", "title", "updatedAt" FROM "Research";
DROP TABLE "Research";
ALTER TABLE "new_Research" RENAME TO "Research";
CREATE TABLE "new_SiteConfig" (
    "id" TEXT NOT NULL PRIMARY KEY DEFAULT 'main',
    "labName" TEXT NOT NULL DEFAULT 'SELab',
    "labNameEn" TEXT NOT NULL DEFAULT '',
    "tagline" TEXT NOT NULL DEFAULT 'Software Engineering Laboratory',
    "taglineEn" TEXT NOT NULL DEFAULT '',
    "description" TEXT NOT NULL DEFAULT '',
    "descriptionEn" TEXT NOT NULL DEFAULT '',
    "bannerUrl" TEXT,
    "address" TEXT NOT NULL DEFAULT '',
    "addressEn" TEXT NOT NULL DEFAULT '',
    "building" TEXT NOT NULL DEFAULT '',
    "buildingEn" TEXT NOT NULL DEFAULT '',
    "email" TEXT NOT NULL DEFAULT '',
    "phone" TEXT NOT NULL DEFAULT '',
    "mapUrl" TEXT,
    "joinUsContent" TEXT NOT NULL DEFAULT '',
    "joinUsContentEn" TEXT NOT NULL DEFAULT '',
    "aboutContent" TEXT NOT NULL DEFAULT '',
    "aboutContentEn" TEXT NOT NULL DEFAULT '',
    "updatedAt" DATETIME NOT NULL
);
INSERT INTO "new_SiteConfig" ("aboutContent", "address", "bannerUrl", "building", "description", "email", "id", "joinUsContent", "labName", "mapUrl", "phone", "tagline", "updatedAt") SELECT "aboutContent", "address", "bannerUrl", "building", "description", "email", "id", "joinUsContent", "labName", "mapUrl", "phone", "tagline", "updatedAt" FROM "SiteConfig";
DROP TABLE "SiteConfig";
ALTER TABLE "new_SiteConfig" RENAME TO "SiteConfig";
PRAGMA foreign_keys=ON;
PRAGMA defer_foreign_keys=OFF;
