summaryrefslogtreecommitdiffstats
path: root/nova/db
diff options
context:
space:
mode:
authorKaushik Chandrashekar <kaushik.chand@gmail.com>2013-03-07 19:17:00 -0600
committerKaushik Chandrashekar <kaushik.chand@gmail.com>2013-03-08 14:10:28 -0600
commit4ed4c848b66bc5fdd42e05c8b8c726ace2c25704 (patch)
treec63f2614fbeab566f8a55d60c2cd69ac52431452 /nova/db
parent6a080df6bd8817019d204e3142a236b7974f7656 (diff)
Compile BigInteger to INTEGER for sqlite
Ensure BigInteger does not map to BIGINT for an auto-created sqlite registry DB, as this type is not supported by sqlite. Refactoring a test to use generic unsupported column type Fixes bug 1147879 Change-Id: I590c798dd470def286802bc6e00bb4b621332b8d
Diffstat (limited to 'nova/db')
-rw-r--r--nova/db/sqlalchemy/__init__.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/nova/db/sqlalchemy/__init__.py b/nova/db/sqlalchemy/__init__.py
index 747015af5..800f11071 100644
--- a/nova/db/sqlalchemy/__init__.py
+++ b/nova/db/sqlalchemy/__init__.py
@@ -15,3 +15,11 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
+
+from sqlalchemy import BigInteger
+from sqlalchemy.ext.compiler import compiles
+
+
+@compiles(BigInteger, 'sqlite')
+def compile_big_int_sqlite(type_, compiler, **kw):
+ return 'INTEGER'