+ if args.create_tables:
+ LOG.warning('Create Tables')
+ with connect(args.config.get_libpq_dsn()) as conn:
+ database_import.create_tables(conn, args.config, args.sqllib_dir, args.reverse_only)
+ refresh.load_address_levels_from_file(conn, Path(args.config.ADDRESS_LEVEL_CONFIG))
+ refresh.create_functions(conn, args.config, args.sqllib_dir,
+ enable_diff_updates=False)
+ database_import.create_table_triggers(conn, args.config, args.sqllib_dir)
+
+ if args.create_partition_tables:
+ LOG.warning('Create Partition Tables')
+ with connect(args.config.get_libpq_dsn()) as conn:
+ database_import.create_partition_tables(conn, args.config, args.sqllib_dir)
+