diff --git a/test/helpers/db_helper.rb b/test/helpers/db_helper.rb index 27997db87..68e6468c9 100644 --- a/test/helpers/db_helper.rb +++ b/test/helpers/db_helper.rb @@ -125,13 +125,13 @@ def seed_random_data(connection, database_name: DEFAULT_DB, table_name: DEFAULT_ return if number_of_rows == 0 transaction(connection) do - sqlargs = (["(?,?)"]*number_of_rows).join(", ") - sql = "INSERT INTO #{dbtable} (id, data) VALUES #{sqlargs}" + sqlargs = (["(?)"]*number_of_rows).join(", ") + sql = "INSERT INTO #{dbtable} (data) VALUES #{sqlargs}" insert_statement = connection.prepare(sql) rand_rows = [] number_of_rows.times do - rand_rows += [nil, rand_data] + rand_rows += [rand_data] end insert_statement.execute(*rand_rows)