Add missing columns to migration 14
This adds created_at, updated_at, and deleted_at to database migration 14. Background Info! If a new database is created at version 14, it doesn't run any migrations scripts. It lets sqlalchemy create the database from a set of sqlalchemy models. When an existing database is upgraded to version 14, it will use the migration script. What's important to note is that this is currently impossible due to bug 1042925. While it is typically bad practice to alter a migration script, this is a special case as nobody could have used it. What this patch does is complete the migration script in preparation for a future patch down the road to fix the bug referenced above. Fixes bug 1043041 Change-Id: I6dc2afa735fb2f82df71d58b10c1e1530fce2f89
This commit is contained in:
parent
4c038b0d85
commit
3917fdf3b0
|
@ -28,6 +28,11 @@ def define_image_tags_table(meta):
|
|||
schema.Column('image_id', glance_schema.String(36),
|
||||
schema.ForeignKey('images.id'), nullable=False),
|
||||
schema.Column('value', glance_schema.String(255), nullable=False),
|
||||
schema.Column('created_at', glance_schema.DateTime(), nullable=False),
|
||||
schema.Column('updated_at', glance_schema.DateTime()),
|
||||
schema.Column('deleted_at', glance_schema.DateTime()),
|
||||
schema.Column('deleted', glance_schema.Boolean(), nullable=False,
|
||||
default=False),
|
||||
mysql_engine='InnoDB')
|
||||
|
||||
schema.Index('ix_image_tags_image_id',
|
||||
|
|
Loading…
Reference in New Issue