Your message dated Mon, 10 Dec 2018 09:20:11 +0000
with message-id <e1gwhjx-000fi0...@fasolo.debian.org>
and subject line Bug#915938: fixed in migrate 0.11.0-4
has caused the Debian Bug report #915938,
regarding migrate: Enable compatability with sqlite >= 3.26
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)
--
915938: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=915938
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: migrate
Version: 0.11.0-3
Severity: important
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu disco ubuntu-patch
Dear Maintainer,
In Ubuntu, the attached patch was applied to achieve the following:
* d/p/use-legacy-alter-sqlite.patch: Cherry-picked from upstream
gerrit review (https://review.openstack.org/#/c/623564/) to ensure
compatability with sqlite >= 3.26 (LP: #1807262).
Thanks for considering the patch.
-- System Information:
Debian Release: buster/sid
APT prefers disco
APT policy: (500, 'disco'), (500, 'cosmic-security'), (500, 'bionic-security')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.18.0-11-generic (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8),
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
diff -Nru migrate-0.11.0/debian/patches/series
migrate-0.11.0/debian/patches/series
--- migrate-0.11.0/debian/patches/series 2018-04-27 04:29:21.000000000
-0400
+++ migrate-0.11.0/debian/patches/series 2018-12-07 14:16:55.000000000
-0500
@@ -2,3 +2,4 @@
keep_empty_modules.patch
disable_issuetracker.patch
remove-tempest-lib-build-depends-from-upstream.patch
+use-legacy-alter-sqlite.patch
diff -Nru migrate-0.11.0/debian/patches/use-legacy-alter-sqlite.patch
migrate-0.11.0/debian/patches/use-legacy-alter-sqlite.patch
--- migrate-0.11.0/debian/patches/use-legacy-alter-sqlite.patch 1969-12-31
19:00:00.000000000 -0500
+++ migrate-0.11.0/debian/patches/use-legacy-alter-sqlite.patch 2018-12-07
14:16:14.000000000 -0500
@@ -0,0 +1,53 @@
+From f73dac34f00f3c783c6a824c93f86a756aa5cf64 Mon Sep 17 00:00:00 2001
+From: Corey Bryant <corey.bry...@canonical.com>
+Date: Fri, 7 Dec 2018 13:49:20 -0500
+Subject: [PATCH] Use legacy_alter_table ON in sqlite recreate_table
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Use "PRAGMA legacy_alter_table = ON" with sqlite >= 3.26 when
+using "ALTER TABLE RENAME TO migration_tmp" to maintain legacy
+behavior.
+
+As of sqlite version 3.26, when a table is renamed using
+"ALTER TABLE RENAME TO", REFERENCES clauses that refer to the
+table will be updated. To maintain legacy (3.24 and earlier)
+behavior, "PRAGMA legacy_alter_table" can be set to true and
+"PRAGMA foreign_keys" can be set to false. [1]
+
+[1] https://www.sqlite.org/src/info/ae9638e9c0ad0c36
+
+Thanks to "László Böszörményi (GCS)" <g...@debian.org> for
+providing the code for this patch, which has since been
+slightly modified.
+
+Change-Id: I539988ab2ad6df6c8f423ecec15364ad8fcc7267
+Closes-Bug: 1807262
+---
+ migrate/changeset/databases/sqlite.py | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/migrate/changeset/databases/sqlite.py
b/migrate/changeset/databases/sqlite.py
+index 92d42f2..568a329 100644
+--- a/migrate/changeset/databases/sqlite.py
++++ b/migrate/changeset/databases/sqlite.py
+@@ -96,8 +96,15 @@ class SQLiteHelper(SQLiteCommon):
+ if omit_constraints is None or cons.name not in omit_constraints
+ ])
+
++ tup = sqlite3.sqlite_version_info
++ if tup[0] > 3 or (tup[0] == 3 and tup[1] >= 26):
++ self.append('PRAGMA legacy_alter_table = ON')
++ self.execute()
+ self.append('ALTER TABLE %s RENAME TO migration_tmp' % table_name)
+ self.execute()
++ if tup[0] > 3 or (tup[0] == 3 and tup[1] >= 26):
++ self.append('PRAGMA legacy_alter_table = OFF')
++ self.execute()
+
+ insertion_string = self._modify_table(table, column, delta)
+
+--
+2.19.1
+
--- End Message ---
--- Begin Message ---
Source: migrate
Source-Version: 0.11.0-4
We believe that the bug you reported is fixed in the latest version of
migrate, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 915...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Thomas Goirand <z...@debian.org> (supplier of updated migrate package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Format: 1.8
Date: Mon, 10 Dec 2018 09:55:26 +0100
Source: migrate
Binary: python-migrate python-migrate-doc python3-migrate
Architecture: source all
Version: 0.11.0-4
Distribution: unstable
Urgency: medium
Maintainer: Debian OpenStack <team+openst...@tracker.debian.org>
Changed-By: Thomas Goirand <z...@debian.org>
Description:
python-migrate - Database schema migration for SQLAlchemy - Python 2.7
python-migrate-doc - Database schema migration for SQLAlchemy - doc
python3-migrate - Database schema migration for SQLAlchemy - Python 3.x
Closes: 915938
Changes:
migrate (0.11.0-4) unstable; urgency=medium
.
[ Ondřej Nový ]
* d/control: Use team+openst...@tracker.debian.org as maintainer
.
[ Thomas Goirand ]
* Move the package in Salsa from /openstack-team/python to libs:
- Update VCS fields accordingly.
* Add SQLite 3.26+ patch from Ubuntu (Closes: #915938). Thanks to Corey
Bryant for forwarding the patch.
Checksums-Sha1:
fdbc27db8be18f64d5019a34a8dca720f09054d7 2886 migrate_0.11.0-4.dsc
e0af36fe7a72fdd6425b5416be2f12e1e01d964e 13404 migrate_0.11.0-4.debian.tar.xz
abf513239a21cfb254e8b81e382539bf1fd2c3ca 10874 migrate_0.11.0-4_amd64.buildinfo
d933318cc45607c206af822b7ad563feafd436c6 91088
python-migrate-doc_0.11.0-4_all.deb
ff1603eff7cbed154366794e34b96e7a87baf751 79288 python-migrate_0.11.0-4_all.deb
f7ad57e1e27b92a4b7d98d40f4a21fe0fc9028ad 79088 python3-migrate_0.11.0-4_all.deb
Checksums-Sha256:
4ea0d93d76bfe19dab50a677158407346d0eeccf8f4f24a1c53a480fcbac9eb4 2886
migrate_0.11.0-4.dsc
279fd5b8111899cc135e954cdc465f7cd0e619ba893f12bd96ba4ee5885cddc7 13404
migrate_0.11.0-4.debian.tar.xz
74cfbeff0f6c43424b540b7e158bf1d4b88e389bdf8b09bd6a752b5827b7bfd9 10874
migrate_0.11.0-4_amd64.buildinfo
e4a7e32f4c7dd3e746b6173d9c806763c32875cdf6138f9767f069741f2e830d 91088
python-migrate-doc_0.11.0-4_all.deb
f2a3a2eb8811a6fdae62ff74a58f14cbb5d5ca8edbae97aae6b2c1863098b0eb 79288
python-migrate_0.11.0-4_all.deb
73da8b5d92f4371519039bf8b25e590f63d7d68b1fd690c80b14c74440967ece 79088
python3-migrate_0.11.0-4_all.deb
Files:
607d23b7aff5cbb145fdfd0836999369 2886 python optional migrate_0.11.0-4.dsc
60e459eb6bc433878f8388cee21a253d 13404 python optional
migrate_0.11.0-4.debian.tar.xz
cd9d41dbc0e67f3d023210a9202567c9 10874 python optional
migrate_0.11.0-4_amd64.buildinfo
89e465ba1da4307cc8584ee19f888a49 91088 doc optional
python-migrate-doc_0.11.0-4_all.deb
71362d1c6004524d31d05f5e92cb6d9a 79288 python optional
python-migrate_0.11.0-4_all.deb
3905d303f3568eb20da0cc34e6d2153a 79088 python optional
python3-migrate_0.11.0-4_all.deb
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCAAdFiEEtKCq/KhshgVdBnYUq1PlA1hod6YFAlwOLG4ACgkQq1PlA1ho
d6bYwA//WJ2e7hFXZ0bePRnXGbaMPS/hcxhAM867wy6r8qw+OJgj3Jg1Notfw/c2
V0hrA6ZTV1GVGo1Uj0Zz0Pc21ZY+smPky4N1zczoXNPNXYzyEAYRJi7JwEfe9uSx
ZbnUvpw5a1M0LiIEn/2wpic7SIyTGp3cQAK0pstBndbyxcH+3budBhhpDf8VRY4A
TPUxobkG6v74KcPEzEAZLQt+D2LmKUel9p2wLoXPL8Te/HAzYhR0+50+CzZLkqNX
MwiI7N8QhCScQYsYgtDvvwfXCucRvwHKOX2qijSHqdd0ln9h13XFd4+OjKP33jXn
68OGW2In2XfyxbFYWIK1JteAI6RmCRPMa7QcoR9YBMwfCWDPiAeWpLMcd/6ja1qC
3YlQqdzFWZvApdoTP6bnNgRQ9w1S6vQ+NO7X2b5gCVtiwIT6IH7KgcEAD/nyxviP
y+318lwdGEfepcqCM7jjNNwXXZS4NWmiyGdkCda4tEp2HpEGKyQUDae9y2suH3ai
qS6MzrSrcFMn6E+lP5JroGXcm2P1DFraa+xMFnzkHN0y7sGGNC9qjdT5Nsn1U/gg
zBK+nMTgzmIH0GcElvFX4rK1bV62uLe3DpLLmF+JQzGjQAKoP/o5qeiG1kRiS4xP
WsxEGXOgPridJJJV4y40ND73XTMYs7+ooiGj6OORIlmT6H1IyvM=
=OWqh
-----END PGP SIGNATURE-----
--- End Message ---