本文整理汇总了Python中neutron.db.migration.schema_has_column函数的典型用法代码示例。如果您正苦于以下问题:Python schema_has_column函数的具体用法?Python schema_has_column怎么用?Python schema_has_column使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了schema_has_column函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_schema_has_column_missing_column
def test_schema_has_column_missing_column(self):
self._prepare_mocked_sqlalchemy_inspector()
self.assertFalse(migration.schema_has_column(
'foo', column_name='meh'))
示例2: test_schema_has_column
def test_schema_has_column(self):
self._prepare_mocked_sqlalchemy_inspector()
self.assertTrue(migration.schema_has_column('foo', 'foo_column'))
示例3: ensure_c460c5682e74_migration
def ensure_c460c5682e74_migration():
if not migration.schema_has_column('nfp_port_infos',
'project_id'):
db_c460c5682e74 = importutils.import_module(DB_c460c5682e74)
db_c460c5682e74.upgrade()
示例4: ensure_bff1774e749e_migration
def ensure_bff1774e749e_migration():
if not migration.schema_has_column(
'ncp_node_instance_network_function_mappings',
'status_details'):
db_bff1774e749e = importutils.import_module(DB_bff1774e749e)
db_bff1774e749e.upgrade()
示例5: ensure_5239b0a50036_migration
def ensure_5239b0a50036_migration():
if not migration.schema_has_column('gp_l2_policies',
'project_id'):
db_5239b0a50036 = importutils.import_module(DB_5239b0a50036)
db_5239b0a50036.upgrade()
示例6: test_schema_has_column_missing_table
def test_schema_has_column_missing_table(self):
self._prepare_mocked_sqlalchemy_inspector()
self.assertFalse(migration.schema_has_column("meh", "meh"))