This repository has been archived by the owner on Feb 6, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add DB schema file and instructions for how to upgrade database file …
…in release builds
- Loading branch information
1 parent
474c3d6
commit 351e298
Showing
2 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
If the database schema changes at all in the server then you must modify your local server.db accordingly for it to work with the newer server version. For this server, [Atlas](https://atlasgo.io/) is used for managing the database. Follow [the setup instructions](https://atlasgo.io/getting-started) to install Atlas. | ||
|
||
Please make sure to create a backup of your server.db before updating the database schema as this is a destructive process. | ||
```bash | ||
For Windows: | ||
copy server.db server_backup.db | ||
|
||
For Linux/MacOS: | ||
cp server.db server_backup.db | ||
``` | ||
|
||
With atlas installed, execute the following command to update your local server.db using the provided schema_for_db_migration.sql file: | ||
```bash | ||
atlas schema apply --auto-approve --url "sqlite3://server.db" --dev-url "sqlite3://server_temp.db" --to "file://schema_for_db_migration.sql" | ||
``` |