Ask Your Question

Revision history [back]

support mssql as backend for keystone?

I've been trying to get keystone work with mssql. It turns out that while it uses sqlalchemy to access the backend, the custom sqlalchemy-migrate package doesn't have the mssql dialects. I've forked the project, created the dialect file but got stuck. The issue is that when the database tables are created for the first time, the name of primary key constraints are not set. In this case mssql generates a name for the PK automatically in the form of PK_tablename_randomnumber. Now when the migration scripts are being played back, there are steps that drop and recreate the primary key. A PK can only be dropped in SQL Server by name so the migration fails. I'm wondering if it's possible to modify the initial database creation to give a name to PK-s, or at least generate the names consitently and pass to MSSQL in the CREATE TABLE statements (sqlalchemy does this if the PK has a name). I'm willing to contribute to the code myself but need some help.