def setup(drop_tables=False): """ create tables if not exist """ did_create = False for models in [Version, Owner, SettingsAdmin, LocalSetting, Organization, Group, Contact, ContactGroup, Transfer]: if drop_tables: models.drop_table() if not models.table_exists(): models.create_table() did_create = True if did_create: from fixture import fixt_init fixt_init().creat_all_or_pass()
def setup(drop_tables=False): """ create tables if not exist """ did_create = False for model in [SettingsAdmin, Version, FileJoin, Organization, Organization, Store, Product, Category, Reports, Owner, Invoice, InvoiceItem]: if drop_tables: model.drop_table() if not model.table_exists(): model.create_table() did_create = True if did_create: from fixture import fixt_init fixt_init().creat_all_or_pass()
def setup(drop_tables=False): """ create tables if not exist """ did_create = False for model in [Owner, Store, Product, Report, Category, Invoice, Buy, Payment, SettingsAdmin, Organization, Version, Refund, ProviderOrClient, FileJoin]: if drop_tables: model.drop_table() if not model.table_exists(): model.create_table() did_create = True if did_create: from fixture import fixt_init fixt_init().creat_all_or_pass()
def setup(drop_tables=False): """ create tables if not exist """ did_create = False for models in [ Version, Owner, SettingsAdmin, LocalSetting, Organization, Group, Contact, ContactGroup, Transfer ]: if drop_tables: models.drop_table() if not models.table_exists(): models.create_table() did_create = True if did_create: from fixture import fixt_init fixt_init().creat_all_or_pass()