Skip to content

Commit b4b8d47

Browse files
authored
Update README.md
1 parent 2bff75a commit b4b8d47

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,17 @@ Get started
4343
4. Setup environment variables, which will overwrite the configs
4444
5. Run the server as you like (node, forever, pm2)
4545

46-
DB migration
46+
Upgrade guide
4747
---
48-
If you are upgrading HackMD from an older version, you might need to do this to apply the DB schema changes.
49-
50-
1. Modify the file named `.sequelizerc`, change the value of the variable `url` with your db connection string.
51-
For example: `postgres://username:password@localhost:5432/hackmd`
52-
2. Run `node_modules/.bin/sequelize db:migrate`, that's it!
48+
If you are upgrading HackMD from an older version, follow below steps:
49+
50+
1. Fully stop your old server first (important).
51+
2. `git pull` or whatever that really update the files.
52+
3. Modify the file named `.sequelizerc`, change the value of the variable `url` with your db connection string.
53+
For example: `postgres://username:password@localhost:5432/hackmd`.
54+
4. Run `node_modules/.bin/sequelize db:migrate`, this step will migrate your db with the latest schema.
55+
You can also revert the migration with `node_modules/.bin/sequelize db:migrate:undo` (do this with caution).
56+
5. Retart your whole new server!
5357

5458
Structure
5559
---

0 commit comments

Comments
 (0)