@@ -132,12 +132,9 @@ middle_pgsql_t::table_desc::table_desc(options_t const &options,
132132 table_sql const &ts)
133133: m_create_table(build_sql(options, ts.create_table)),
134134 m_prepare_queries (build_sql(options, ts.prepare_queries)),
135- m_copy_target(std::make_shared<db_target_descr_t >())
135+ m_copy_target(std::make_shared<db_target_descr_t >(
136+ options.middle_dbschema, build_sql(options, ts.name), "id"))
136137{
137- m_copy_target->name = build_sql (options, ts.name );
138- m_copy_target->schema = options.middle_dbschema ;
139- m_copy_target->id = " id" ;
140-
141138 if (options.with_forward_dependencies ) {
142139 m_create_fw_dep_indexes = build_sql (options, ts.create_fw_dep_indexes );
143140 }
@@ -1324,9 +1321,8 @@ void middle_pgsql_t::write_users_table()
13241321{
13251322 log_info (" Writing {} entries to table '{}'..." , m_users.size (),
13261323 m_users_table.name ());
1327- auto const users_table =
1328- std::make_shared<db_target_descr_t >(m_users_table.name (), " id" );
1329- users_table->schema = m_users_table.schema ();
1324+ auto const users_table = std::make_shared<db_target_descr_t >(
1325+ m_users_table.schema (), m_users_table.name (), " id" );
13301326
13311327 for (auto const &[id, name] : m_users) {
13321328 m_db_copy.new_line (users_table);
0 commit comments