Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Database plugin: Provide migration support #215

Closed
ohinckel opened this issue Jul 9, 2017 · 7 comments
Closed

Database plugin: Provide migration support #215

ohinckel opened this issue Jul 9, 2017 · 7 comments

Comments

@ohinckel
Copy link
Member

ohinckel commented Jul 9, 2017

To migrate from sqlite plugin to the database plugin we need to have

  • a migration script which converts the items conf/yaml files
  • a documentation how to migrate

(leftover from #165)

@psilo909
Copy link
Contributor

will we really need a migration script for the CONF / YAML Files? wont an "extended replace" function of a good editor like notepad++ fit to the requirement?

@psilo909
Copy link
Contributor

what we should do is a wiki page for the lesser technical people in here, e.g. how to install maria db, how to set a dedicated smarthome user, etc. i can start with that the next days.

@ohinckel
Copy link
Member Author

Sure, one can just do a search replace magic. But I remember somebody asking for a migration script (like the conf to yaml converter). I'm think a migration is an easy step in the configuration file, too.

But what about the existing data in the databases. Do we need a script for dumping the old SQLite database and importing it into a new RDBMS database?

@psilo909
Copy link
Contributor

@ohinckel didnt the "someone" mean a migration from sqlite .db file to e.g. maria db database?

@bmxp
Copy link
Member

bmxp commented Jul 16, 2017

We actually alread have a "migration script" from conf to yaml since @msinn put it into tools/conf_to_yaml_converter.py. One just has to know about and use it. So we really just need a migration manual like the Komplettanleitung.

@psilo909
Copy link
Contributor

@bmxp u get it wrong, @ohinckel means that we need a script like that to convert e.g. sqlite = yes to database = xyz

@ohinckel
Copy link
Member Author

ohinckel commented Sep 2, 2018

Added a simple script which converts conf/yaml files using sqlite settings to database settings. Because only the sqlite setting needs to be converted (also the possible values yes and init are supported by the database backend) it can be done be using a simple regex magic.

@bmxp bmxp closed this as completed Dec 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants