lp:~nick-moffitt/charms/precise/keystone/migrate-sqlite-to-mysql

Created by Nick Moffitt and last modified
Get this branch:
bzr branch lp:~nick-moffitt/charms/precise/keystone/migrate-sqlite-to-mysql
Only Nick Moffitt can upload to this branch. If you are Nick Moffitt please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Nick Moffitt
Status:
Development

Recent revisions

42. By Nick Moffitt

Moved sqlfairy installation insurance down to the db_changed hook, so that it happens only when it's needed.
This is in response to https://code.launchpad.net/~nick-moffitt/charms/precise/keystone/migrate-sqlite-to-mysql/+merge/149334/comments/327313

41. By Nick Moffitt

Fix the half-finished upgrade-charm work.

40. By Nick Moffitt

Automatically migrate the database schema and contents when moving from sqlite to mysql.

This change uses sqlfairy (http://packages.ubuntu.com/precise/libsql-translator-perl) to migrate the schema and then all rows from the default sqlite database over to the new database when the mysql relation fires for the first time. The rationale is that users may not realize that they're using sqlite until it's too late, and adding the relation caused a loss of all authentication data.

The SQL generated from sqlfairy needed some manipulation in order to work.
In particular:

    * "UNIQUE `` (`name`)" commands needed a UID of some sort between the ``
      for mysql to accept them
    * As we're running these mysql 'LOAD DATA' commands from a remote
      client, 'LOAD DATA INFILE' needed to become 'LOAD DATA LOCAL INFILE',
      and the mysql client needed to be explicitly told to allow this
      syntax.

The install hook edits configuration entries, risking loss of idempotence. Instead of just re-running it in the upgrade hook, I've replicated the apt-get commands.

39. By Adam Gandelman

Merge post-Diablo swift support.

38. By Adam Gandelman

Trivial fix: Use correct versioning for Grizzly (2013.1).

37. By Adam Gandelman

Merge support for Quantum service from p:~james-page/charms/precise/keystone/quantum-support.

36. By Adam Gandelman

Merge fixes for handling of deb source URLs.

35. By Adam Gandelman

Add upgrade support, common code.

34. By Adam Gandelman

Add missing sym link: hooks/config-changed.

33. By Adam Gandelman

Merged config-changed support from lp:~gandelman-a/charms/precise/keystone/config-changed

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
Stacked on:
lp:~charmers/charms/precise/keystone/trunk
This branch contains Public information 
Everyone can see this information.

Subscribers