#85 Insert initial data on table create using sqlobject-admin

open
nobody
General (125)
5
2013-01-18
2005-05-13
Rick Flosi
No

Add the ability to have sqlobject-admin insert some
initial data after creating a table. The data to be
inserted should be read the SQLObject. You should be
able to have the option of specifying the values for
ids and to set the sequence value after insertion is done.

In postgres it would be the equivalent of doing the
following:

CREATE TABLE my_table(
id SERIAL PRIMARY KEY,
my_field TEXT
);

INSERT INTO my_table(id,my_field) VALUES(1,'one');
INSERT INTO my_table(id,my_field) VALUES(2,'two');

SELECT SETVAL('my_table_id_seq',2);

Discussion