Update Todomator
Move an existing installation to release 1.7.
Follow these steps to update an existing installation.
Prepare the update
- Back up your data.
- Stop Todomator.
- Find your current version. Open
definitions/init.jsand look forCONF.version.
Update the database
Run the update scripts from the application folder, before you start the new release. Run only the scripts for versions newer than yours, in this order:
| Script | Run it when your version is |
|---|---|
database-20240119.sql | Installed before 19 January 2024 |
database_1-3.sql | Older than 1.3 |
database_1-4.sql | Older than 1.4 |
database_1-5.sql | Older than 1.5 |
database_1-6.sql | Older than 1.6 |
For example:
psql "postgresql://user:password@localhost:5432/todomator" -f database_1-6.sqlDo not run database.sql. It is only for new installations, and Todomator runs it by itself.
Then add the columns for release 1.7:
psql "postgresql://user:password@localhost:5432/todomator" -c "ALTER TABLE tbl_user ADD COLUMN IF NOT EXISTS is2fa BOOLEAN DEFAULT FALSE, ADD COLUMN IF NOT EXISTS code TEXT, ADD COLUMN IF NOT EXISTS dtcode TIMESTAMP;"Update the application
1. Replace the application files with those of the new release. Keep your config file and the databases folder.
2. Install the dependencies:
npm install3. Start Todomator:
node index.js