Try migrate in start script

This commit is contained in:
Kalle 2022-06-08 00:03:05 +03:00
parent b8ea8806f4
commit ad9ed1df56
2 changed files with 55 additions and 2 deletions

View File

@ -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",

53
plus-server-plan.md Normal file
View File

@ -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