From ad9ed1df5649b53cdca6502ee883f065daaea8e0 Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Wed, 8 Jun 2022 00:03:05 +0300 Subject: [PATCH] Try migrate in start script --- package.json | 4 ++-- plus-server-plan.md | 53 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 plus-server-plan.md diff --git a/package.json b/package.json index 5a51e8687..b7aca2a6b 100644 --- a/package.json +++ b/package.json @@ -3,11 +3,11 @@ "private": true, "sideEffects": false, "scripts": { - "deploy": "npm install && npm run migrate up && npm run build", + "deploy": "npm install && npm run build", "build": "remix build", "dev": "cross-env NODE_ENV=development remix dev", "dev:cypress": "cross-env NODE_ENV=test PORT=4455 DB_PATH=db-cypress.sqlite3 remix dev", - "start": "remix-serve build", + "start": "npm run migrate up && remix-serve build", "migrate": "ley", "migrate:reset": "node scripts/delete-db-files.mjs && npm run migrate && npm run seed", "seed": "node --experimental-specifier-resolution=node --loader ts-node/esm -r tsconfig-paths/register scripts/seed.ts", diff --git a/plus-server-plan.md b/plus-server-plan.md new file mode 100644 index 000000000..929066153 --- /dev/null +++ b/plus-server-plan.md @@ -0,0 +1,53 @@ +- /plus + -> Shows if you are suggested or not +- CRUD suggestions for your own tier and below +- CUD disabled when voting is active + +- /plus/voting + +## Voting is active + +-> If not member just show same view as when voting is not active + +- When voting the progress is saved in your browser so even if you leave the page you can continue where you left off. +- +1/-1 regardless of region + +## Voting is not active + +- You will see who passed the last voting and who didn't. +- If you didn't pass the voting and you were a suggestion then you will see your own percentage + - others see who passed and who didn't per tier + - at the top show your own results in green/red per tier + +## Tables + +- "User" + +* "plusTier" 1/2/3 + +- "PlusSuggestion" + +* "text" text +* "authorId" text +* "suggestedId" text +* "month" +* "year" +* "tier" 1/2/3 +* "createdAt" + +- "PlusVote" + +* "month" +* "year" +* "tier" +* "authorId" +* "votedId" +* "score" + +unique on month, year, authorId, votedId + +# Cypress + +- uses different db file +- uses different port +- NODE_ENV = test