Jump to: navigation, search

Difference between revisions of "Neutron/DatabaseMigration"

Line 1: Line 1:
  
= Quantum Database Migration =
+
= Neutron Database Migration =
  
Now Quantum supports database migration from Quantum Folsom to Quantum Grizzly+.
+
When a developer submits a patch to Neutron that changes the database model,
When a developer submits a patch to Quantum that changes the database model,
 
 
a database migration script is required.
 
a database migration script is required.
  
* Detail description : https://github.com/openstack/quantum/blob/master/neutron/db/migration/README
+
* Detail description : https://github.com/openstack/neutron/blob/master/neutron/db/migration/README
  
 
== Howto ==
 
== Howto ==
  
# Quantum repo $git checkout master
+
# Neutron repo $git checkout master
 
# Run devstack (with your plugin)
 
# Run devstack (with your plugin)
# quantum-db-manage --config-file /etc/quantum/quantum.conf --config-file <plugin.ini> stamp head
+
# Stop neutron services
# Stop quantum services
+
# Neutron repo $git checkout <your feature branch>
# Quantum repo $git checkout <your feature branch>
+
# neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file <plugin.ini> revision -m "Description" --autogenerate
# quantum-db-manage --config-file /etc/quantum/quantum.conf --config-file <plugin.ini> revision -m "Description" --autogenerate
+
# Restart Neutron services (if needed)
# Restart Quantum services (if needed)
 
  
 
[note] First 20 chars of "Description" is used as a part of a filename of a migration script.
 
[note] First 20 chars of "Description" is used as a part of a filename of a migration script.

Revision as of 02:25, 22 August 2013

Neutron Database Migration

When a developer submits a patch to Neutron that changes the database model, a database migration script is required.

Howto

  1. Neutron repo $git checkout master
  2. Run devstack (with your plugin)
  3. Stop neutron services
  4. Neutron repo $git checkout <your feature branch>
  5. neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file <plugin.ini> revision -m "Description" --autogenerate
  6. Restart Neutron services (if needed)

[note] First 20 chars of "Description" is used as a part of a filename of a migration script.