Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.
TypeScript accessibilityalternativecloudflarecloudflare-workersdesignfreefrontendopen-sourceradix-uireactremixweb-developmentwebflowwebsite-builderwebsite-developmentwebsiteswebstudio
add migrations to app
Sara Vieiraf5495a7e0364
diff --git a/Dockerfile b/Dockerfileindex 43c584a4c5..7a64a24752 100644--- a/Dockerfile+++ b/Dockerfile@@ -30,8 +30,7 @@ WORKDIR /myappCOPY --from=deps /myapp/node_modules /myapp/node_modules-COPY --from=deps /myapp/node_modules/@webstudio-is/sdk/prisma /myapp/prisma-+ADD prisma .ADD . .RUN yarn build@@ -48,11 +47,11 @@ RUN echo "#!/bin/sh\nset -x\nsqlite3 \$DATABASE_URL" > /usr/local/bin/database-cWORKDIR /myappCOPY --from=production-deps /myapp/node_modules /myapp/node_modules-COPY --from=build /myapp/node_modules/.prisma /myapp/node_modules/.prisma+COPY --from=production-deps /myapp/prisma /myapp/prisma+COPY --from=build /myapp/build /myapp/buildCOPY --from=build /myapp/public /myapp/publicADD . .-RUN yarn prisma migrate dev --schema ./node_modules/@webstudio-is/sdk/prisma/schema.prismaCMD ["npm", "start"]\ No newline at end of filediff --git a/fly.sh b/fly.shindex 4e63c08457..266293c550 100644--- a/fly.sh+++ b/fly.sh@@ -6,5 +6,5 @@#!/bin/shset -ex-yarn prisma migrate deploy+yarn prisma migrate deploy --schema ./node_modules/@webstudio-is/sdk/prisma/schema.prismayarn start\ No newline at end of filediff --git a/prisma/migrations/20220525210227_/migration.sql b/prisma/migrations/20220525210227_/migration.sqlnew file mode 100644index 0000000000..dcd537be36--- /dev/null+++ b/prisma/migrations/20220525210227_/migration.sql@@ -0,0 +1,38 @@+-- CreateTable+CREATE TABLE "Project" (+ "id" TEXT NOT NULL PRIMARY KEY,+ "userId" TEXT NOT NULL,+ "title" TEXT NOT NULL,+ "domain" TEXT NOT NULL,+ "prodTreeId" TEXT,+ "devTreeId" TEXT NOT NULL,+ "prodTreeIdHistory" TEXT NOT NULL DEFAULT '[]'+);++-- CreateTable+CREATE TABLE "User" (+ "id" TEXT NOT NULL PRIMARY KEY+);++-- CreateTable+CREATE TABLE "Tree" (+ "id" TEXT NOT NULL PRIMARY KEY,+ "root" TEXT NOT NULL+);++-- CreateTable+CREATE TABLE "InstanceProps" (+ "id" TEXT NOT NULL PRIMARY KEY,+ "instanceId" TEXT NOT NULL,+ "treeId" TEXT NOT NULL,+ "props" TEXT NOT NULL DEFAULT '[]'+);++-- CreateTable+CREATE TABLE "Breakpoints" (+ "treeId" TEXT NOT NULL PRIMARY KEY,+ "values" TEXT NOT NULL DEFAULT '[]'+);++-- CreateIndex+CREATE UNIQUE INDEX "Project_domain_key" ON "Project"("domain");diff --git a/prisma/migrations/migration_lock.toml b/prisma/migrations/migration_lock.tomlnew file mode 100644index 0000000000..e5e5c4705a--- /dev/null+++ b/prisma/migrations/migration_lock.toml@@ -0,0 +1,3 @@+# Please do not edit this file manually+# It should be added in your version-control system (i.e. Git)+provider = "sqlite"\ No newline at end of file