Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 7
Create database template for new projects #1920
Copy link
Copy link
Labels
💻 FW Liteissues related to the fw lite application, not miniLcm or crdt relatedissues related to the fw lite application, not miniLcm or crdt related📖 MiniLcmissues related to miniLcm library code, includes fwdat bridge and lcmCrdtissues related to miniLcm library code, includes fwdat bridge and lcmCrdt
Description
Activity
Metadata
Metadata
Assignees
Labels
💻 FW Liteissues related to the fw lite application, not miniLcm or crdt relatedissues related to the fw lite application, not miniLcm or crdt related📖 MiniLcmissues related to miniLcm library code, includes fwdat bridge and lcmCrdtissues related to miniLcm library code, includes fwdat bridge and lcmCrdt
Describe the feature
We want to be able to create new projects, which include all the seeded data from the fwdata template project. The template will be stored in our repo as a sql file, which when a new project is created the sql file will be applied to the database.
How the template will be created:
sqlite3 .\Example-Project.sqlite ".dump" > template.sqlwe now have a sql file which can be applied to a database to spin it up very quickly.Note
This could happen in CI or we could just manually run the script to update the template from time to time, I'm not sure what's best here, FieldWorks does sometimes update their template, so we would want to try and keep in sync with that.
How the template will be used when creating a new project
cat template.sql | sqlite newProject.sqlto create the databaseupdate Commits set ClientId = 'newid', we do this so that the same ClientId isn't matched across all databases, though it's possible this is actually desirable.