Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Database Upgrade/Migration #39

Open
ChristopheCVB opened this issue Aug 18, 2014 · 2 comments
Open

Database Upgrade/Migration #39

ChristopheCVB opened this issue Aug 18, 2014 · 2 comments

Comments

@ChristopheCVB
Copy link
Contributor

Are you thinking about implementing a way to be able to upgrade/migrate the database ?

I see 2 ways :

  • Adding Version in Manifest and a script in assets to allow manual migration
  • Adding Version in Manifest and checking Tables programmatically at the app init

Of course, there are other ways to do that.
What are your thoughts about it @roscopeco ?

@roscopeco
Copy link
Owner

I would love to implement something like this (it's been discussed a bit before). However, I'm not sure it would be best as part of the core lib, or as an add-on.

In any event, it's always been on the todo list, but not something I've gotten around to...

I like the script idea (a la rails migrations) but what language? I wouldn't want to bloat the core lib by including some kind of interpreter ideally...

@ChristopheCVB
Copy link
Contributor Author

Yeah, the script idea is the best I think as it will be the most performant.
I was thinking of SQL Scripts. Like seen in this [ http://stackoverflow.com/questions/4253804/insert-new-column-into-table-in-sqlite ] post. It will enable the developer to have full control.

But, it'd be so nice to allow database upgrade without the developer knowing it, just checking everything is fine, or if it's not, altering tables, and all of that programmatically...
Anyway, it's not an easy (Table name change, Column name change...) and perfomant (Much more SQL request would be executed) solution, so I would stick to the first, which meet the needs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants