~corey.bryant/sahara/2015.1-b2-0ubuntu1

« back to all changes in this revision

Viewing changes to debian/patches/fix-alembic-migration-for-sqlite-1.patch

  • Committer: james.page at ubuntu
  • Date: 2015-01-07 14:54:50 UTC
  • Revision ID: james.page@ubuntu.com-20150107145450-me9ye4pt5g52vgrn
* Sync with Debian experimental.
* Align with other Ubuntu OpenStack packages:
  - d/*: Remove use of dbconfig-common and debconf.
  - d/control: Align with Ubuntu dependency versions.
  - d/sahara-common.postinst.in: Only sync db if sqlite is configured,
    secure permissions on /etc/sahara.
* d/watch: Update to use tarballs.openstack.org for releases.
* New upstream beta release:
  - d/control: Align with new upstream version requirements.
  - d/rules: Drop install of alembic migrations, now performed upstream.
  - d/p/disable-migration-tests.patch: Disable migration tests has they
    currently depend on running and configured MySQL and PostgreSQL.
* New upstream release.
* Now requires openstack-pkg-tools (>= 20~).
* Fixed the sahara endpoint url from v1 to v1.1.
* New upstream release.
* New upstream release.
* Review short description.
* New upstream release.
* Added python-mysqldb as dependency.
* Updated (build-)depends for this release.
* Now using templated init script for sysv-rc, generated systemd unit and
  upstart jobs, using openstack-pkg-tools >= 13.
* Removed Use_auth_uri_parameter_from_config.patch applied upstream.
* Added doc-base registration file in sahara-doc.
* Standards-Version is now 3.9.6 (no change).
* Initial release. (Closes: #762659)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Description: Fix alembic migration for SQLite 3
 
2
Author: Thomas Goirand <zigo@debian.org>
 
3
Forwarded: no
 
4
Last-Update: 2014-09-25
 
5
 
 
6
--- sahara-2014.2~b3.orig/sahara/db/migration/alembic_migrations/versions/007_increase_status_description_size.py
 
7
+++ sahara-2014.2~b3/sahara/db/migration/alembic_migrations/versions/007_increase_status_description_size.py
 
8
@@ -32,12 +32,18 @@ from sahara.db.sqlalchemy import types a
 
9
 
 
10
 
 
11
 def upgrade():
 
12
-    op.alter_column('clusters', 'status_description',
 
13
-                    type_=st.LongText(), existing_nullable=True,
 
14
-                    existing_server_default=None)
 
15
+    bind = op.get_bind()
 
16
+    engine = bind.engine
 
17
+    if engine.name != 'sqlite':
 
18
+        op.alter_column('clusters', 'status_description',
 
19
+                        type_=st.LongText(), existing_nullable=True,
 
20
+                        existing_server_default=None)
 
21
 
 
22
 
 
23
 def downgrade():
 
24
-    op.alter_column('clusters', 'status_description',
 
25
-                    type_=sa.String(length=200), existing_nullable=True,
 
26
-                    existing_server_default=None)
 
27
+    bind = op.get_bind()
 
28
+    engine = bind.engine
 
29
+    if engine.name != 'sqlite':
 
30
+        op.alter_column('clusters', 'status_description',
 
31
+                        type_=sa.String(length=200), existing_nullable=True,
 
32
+                        existing_server_default=None)