diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2013-04-05 10:16:48 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2013-04-10 18:46:44 +0200 |
commit | 853d76b58e96aab4e6182cc1234652dfcdd74c14 (patch) | |
tree | 612e54f542dd3d6a11d8a8299f2c82f35e9e714e /odb/relational/sqlite | |
parent | c9dbc099d74d92b17724a24823aafe1fcc8ca7e7 (diff) |
Generate alter column migration statements
Diffstat (limited to 'odb/relational/sqlite')
-rw-r--r-- | odb/relational/sqlite/schema.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/odb/relational/sqlite/schema.cxx b/odb/relational/sqlite/schema.cxx index ac19328..6d3cba4 100644 --- a/odb/relational/sqlite/schema.cxx +++ b/odb/relational/sqlite/schema.cxx @@ -122,6 +122,17 @@ namespace relational trav_rel::unames n; n >> c; names (at, n); + + // SQLite does not support altering columns. + // + if (sema_rel::alter_column* ac = check<sema_rel::alter_column> (at)) + { + cerr << "error: SQLite does not support altering of columns" + << endl; + cerr << "info: first altered column is '" << ac->name () << + "' in table '" << at.name () << "'" << endl; + throw operation_failed (); + } } }; entry<alter_table_pre> alter_table_pre_; |