2015-01-28 11:59:38 |
Andrew Pashkin |
bug |
|
|
added bug |
2015-01-28 12:24:39 |
Andrew Pashkin |
summary |
Models is out of sync with migrations |
Models are out of sync with migrations |
|
2015-01-28 12:26:32 |
Andrew Pashkin |
description |
In Murano project, declarative models is out of sync with changes scripted in migrations.
For example:
1) This migration creates two indexes - unique [1] and non-unique [2].
- Checkout Murano
- Configure it to use MySQL
- Execute
tox -e venv -- murano-db-manage --config-file ./etc/murano/murano.conf upgrade --revision 001
- Execute "SHOW CREATE TABLE category;" in MySQL shell.
It will output:
CREATE TABLE `category` (
`created` datetime NOT NULL,
`updated` datetime NOT NULL,
`id` varchar(36) NOT NULL,
`name` varchar(80) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`),
KEY `ix_category_name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
Notice two indices.
[1] https://review.openstack.org/gitweb?p=stackforge/murano.git;a=blob;f=murano/db/migration/alembic_migrations/versions/001_inital_version.py;h=3076e3fefa33b83059cf262089a57598705f7afd;hb=HEAD#l93
[2] https://review.openstack.org/gitweb?p=stackforge/murano.git;a=blob;f=murano/db/migration/alembic_migrations/versions/001_inital_version.py;h=3076e3fefa33b83059cf262089a57598705f7afd;hb=HEAD#l99
2) Migration 004 amends field "package.description"
from VARCHAR(512) to TEXT [3]. At the same time model declaration still
reference "description" field as VARCHAR(512) [4]
[3] https://review.openstack.org/gitweb?p=stackforge/murano.git;a=blob;f=murano/db/migration/alembic_migrations/versions/004_change_package_desc_type.py;h=9e46282e8c695c3b3147304e31076731a5bdf358;hb=HEAD#l65
[4] https://review.openstack.org/gitweb?p=stackforge/murano.git;a=blob;f=murano/db/models.py;h=e176b2acca516365fc243e9813e76eb5638ebd83;hb=HEAD#l223
3) Alembic has capabilities to find out differences between
models and actual DB structure.
And it shows that such differences are exist:
- Checkout Murano
- Configure it to use MySQL
- Execute
tox -e venv -- murano-db-manage --config-file ./etc/murano/murano.conf upgrade
- Execute
tox -e venv -- murano-db-manage --config-file ./etc/murano/murano.conf revision --autogenerate
- Check out the new migration in "/murano/db/migration/alembic_migrations/versions".
It refects differences between models and DB.
Revision: e176b2acca516365fc243e9813e76eb5638ebd83
Project: murano |
In Murano project, declarative models is out of sync with changes scripted in migrations.
For example:
1) This migration creates two indexes - unique [1] and non-unique [2].
- Checkout Murano
- Configure it to use MySQL
- Execute
tox -e venv -- murano-db-manage --config-file ./etc/murano/murano.conf upgrade --revision 001
- Execute "SHOW CREATE TABLE category;" in MySQL shell.
It will output:
CREATE TABLE `category` (
`created` datetime NOT NULL,
`updated` datetime NOT NULL,
`id` varchar(36) NOT NULL,
`name` varchar(80) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`),
KEY `ix_category_name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
Notice two indices.
[1] https://review.openstack.org/gitweb?p=stackforge/murano.git;a=blob;f=murano/db/migration/alembic_migrations/versions/001_inital_version.py;h=3076e3fefa33b83059cf262089a57598705f7afd;hb=HEAD#l93
[2] https://review.openstack.org/gitweb?p=stackforge/murano.git;a=blob;f=murano/db/migration/alembic_migrations/versions/001_inital_version.py;h=3076e3fefa33b83059cf262089a57598705f7afd;hb=HEAD#l99
2) Migration 004 amends field "package.description"
from VARCHAR(512) to TEXT [3]. At the same time model declaration still
reference "description" field as VARCHAR(512) [4].
[3] https://review.openstack.org/gitweb?p=stackforge/murano.git;a=blob;f=murano/db/migration/alembic_migrations/versions/004_change_package_desc_type.py;h=9e46282e8c695c3b3147304e31076731a5bdf358;hb=HEAD#l65
[4] https://review.openstack.org/gitweb?p=stackforge/murano.git;a=blob;f=murano/db/models.py;h=e176b2acca516365fc243e9813e76eb5638ebd83;hb=HEAD#l223
3) Alembic has capabilities to find out differences between
models and actual DB structure.
And it shows that such differences are exist:
- Checkout Murano
- Configure it to use MySQL
- Execute
tox -e venv -- murano-db-manage --config-file ./etc/murano/murano.conf upgrade
- Execute
tox -e venv -- murano-db-manage --config-file ./etc/murano/murano.conf revision --autogenerate
- Check out the new migration in "/murano/db/migration/alembic_migrations/versions".
It refects differences between models and DB.
Revision: 987e897937ddf534770afa4ebfe7dfeeed6d8ade
Project: murano |
|
2015-01-29 16:55:50 |
Andrew Pashkin |
description |
In Murano project, declarative models is out of sync with changes scripted in migrations.
For example:
1) This migration creates two indexes - unique [1] and non-unique [2].
- Checkout Murano
- Configure it to use MySQL
- Execute
tox -e venv -- murano-db-manage --config-file ./etc/murano/murano.conf upgrade --revision 001
- Execute "SHOW CREATE TABLE category;" in MySQL shell.
It will output:
CREATE TABLE `category` (
`created` datetime NOT NULL,
`updated` datetime NOT NULL,
`id` varchar(36) NOT NULL,
`name` varchar(80) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`),
KEY `ix_category_name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
Notice two indices.
[1] https://review.openstack.org/gitweb?p=stackforge/murano.git;a=blob;f=murano/db/migration/alembic_migrations/versions/001_inital_version.py;h=3076e3fefa33b83059cf262089a57598705f7afd;hb=HEAD#l93
[2] https://review.openstack.org/gitweb?p=stackforge/murano.git;a=blob;f=murano/db/migration/alembic_migrations/versions/001_inital_version.py;h=3076e3fefa33b83059cf262089a57598705f7afd;hb=HEAD#l99
2) Migration 004 amends field "package.description"
from VARCHAR(512) to TEXT [3]. At the same time model declaration still
reference "description" field as VARCHAR(512) [4].
[3] https://review.openstack.org/gitweb?p=stackforge/murano.git;a=blob;f=murano/db/migration/alembic_migrations/versions/004_change_package_desc_type.py;h=9e46282e8c695c3b3147304e31076731a5bdf358;hb=HEAD#l65
[4] https://review.openstack.org/gitweb?p=stackforge/murano.git;a=blob;f=murano/db/models.py;h=e176b2acca516365fc243e9813e76eb5638ebd83;hb=HEAD#l223
3) Alembic has capabilities to find out differences between
models and actual DB structure.
And it shows that such differences are exist:
- Checkout Murano
- Configure it to use MySQL
- Execute
tox -e venv -- murano-db-manage --config-file ./etc/murano/murano.conf upgrade
- Execute
tox -e venv -- murano-db-manage --config-file ./etc/murano/murano.conf revision --autogenerate
- Check out the new migration in "/murano/db/migration/alembic_migrations/versions".
It refects differences between models and DB.
Revision: 987e897937ddf534770afa4ebfe7dfeeed6d8ade
Project: murano |
In Murano project, declarative models is out of sync with changes scripted in migrations.
For example:
1) Migration 004 amends field "package.description"
from VARCHAR(512) to TEXT [3]. At the same time model declaration still
reference "description" field as VARCHAR(512) [4].
[3] https://review.openstack.org/gitweb?p=stackforge/murano.git;a=blob;f=murano/db/migration/alembic_migrations/versions/004_change_package_desc_type.py;h=9e46282e8c695c3b3147304e31076731a5bdf358;hb=HEAD#l65
[4] https://review.openstack.org/gitweb?p=stackforge/murano.git;a=blob;f=murano/db/models.py;h=e176b2acca516365fc243e9813e76eb5638ebd83;hb=HEAD#l223
2) Alembic has capabilities to find out differences between
models and actual DB structure.
And it shows that such differences are exist:
- Checkout Murano
- Configure it to use MySQL
- Execute
tox -e venv -- murano-db-manage --config-file ./etc/murano/murano.conf upgrade
- Execute
tox -e venv -- murano-db-manage --config-file ./etc/murano/murano.conf revision --autogenerate
- Check out the new migration in "/murano/db/migration/alembic_migrations/versions".
It refects differences between models and DB.
Revision: 987e897937ddf534770afa4ebfe7dfeeed6d8ade
Project: murano |
|
2015-02-06 11:35:12 |
OpenStack Infra |
murano: status |
New |
In Progress |
|
2015-02-06 11:35:12 |
OpenStack Infra |
murano: assignee |
|
Andrew Pashkin (apashkin) |
|
2015-02-16 14:38:43 |
OpenStack Infra |
murano: status |
In Progress |
Fix Committed |
|
2015-04-09 08:17:14 |
Ekaterina Chernova |
murano: milestone |
|
kilo-rc1 |
|
2015-04-09 08:17:28 |
Ekaterina Chernova |
murano: status |
Fix Committed |
In Progress |
|
2015-04-09 10:23:33 |
Kirill Zaitsev |
murano: milestone |
kilo-rc1 |
liberty-1 |
|
2015-04-09 10:26:14 |
Ekaterina Chernova |
murano: importance |
Undecided |
High |
|
2015-04-09 10:26:16 |
Alexander Tivelkov |
murano: status |
In Progress |
Confirmed |
|
2015-04-09 10:26:19 |
Ekaterina Chernova |
murano: milestone |
liberty-1 |
kilo-rc1 |
|
2015-04-09 10:26:20 |
Alexander Tivelkov |
murano: assignee |
Andrew Pashkin (apashkin) |
|
|
2015-04-09 10:30:05 |
Ekaterina Chernova |
murano: milestone |
kilo-rc1 |
liberty-1 |
|
2015-05-25 08:31:53 |
Ekaterina Chernova |
murano: status |
Confirmed |
Fix Committed |
|
2015-05-25 15:35:47 |
Kirill Zaitsev |
murano: status |
Fix Committed |
Confirmed |
|
2015-05-25 16:40:56 |
OpenStack Infra |
murano: status |
Confirmed |
In Progress |
|
2015-05-25 16:40:56 |
OpenStack Infra |
murano: assignee |
|
Dmytro Dovbii (ddovbii) |
|
2015-06-24 10:01:44 |
Ekaterina Chernova |
murano: status |
In Progress |
Fix Committed |
|
2015-06-29 12:06:42 |
Serg Melikyan |
murano: status |
Fix Committed |
Fix Released |
|
2015-10-15 15:51:34 |
Serg Melikyan |
murano: milestone |
liberty-1 |
1.0.0 |
|
2015-11-06 15:53:16 |
Kirill Zaitsev |
murano: milestone |
1.0.0 |
1.0.1 |
|