-- SQL statements which are executed at application startup if hibernate.hbm2ddl.auto is 'create' or 'create-drop'

insert into revinfo (rev, revtstmp) values (1, extract('epoch' from CURRENT_TIMESTAMP)::bigint); 
insert into choice (id, keyword ) values (1, 'First Choice') ;
insert into choice_aud (rev,revtype,id, keyword ) values (1, 0, 1, 'First Choice') ;

insert into object1 (id, keyword, choice_id) values (1, 'test1', 1) ;
insert into object1_aud (rev,revtype,id, keyword, choice_id) values (1, 0, 1, 'test1', 1) ;
insert into object1 (id, keyword, choice_id) values (2, 'test2', 1) ;
insert into object1_aud (rev,revtype,id, keyword, choice_id) values (1, 0, 2, 'test2', 1) ;
insert into object1 (id, keyword, choice_id) values (3, 'test3', 1) ;
insert into object1_aud (rev,revtype,id, keyword, choice_id) values (1, 0, 3, 'test3', 1) ;

 


insert into object2 (id, keyword) values (1, 'test1') ;
insert into object2_aud (rev,revtype,id, keyword) values (1, 0, 1, 'test1') ;
insert into object2 (id, keyword) values (2, 'test2') ;
insert into object2_aud (rev,revtype,id, keyword) values (1, 0, 2, 'test2') ;
insert into object2 (id, keyword) values (3, 'test3') ;
insert into object2_aud (rev,revtype,id, keyword) values (1, 0, 3, 'test3') ;


insert into object3 (id, keyword) values (1, 'object3-1') ;
insert into object3_aud (rev,revtype,id, keyword) values (1, 0, 1, 'object3-1') ;



--insert into object1_object2 (object1_id, object2_id) values (1 , 1);
--insert into object1_object2_aud (rev, revtype, object1_id, object2_id) values (1, 0, 1 , 1);
insert into object1_object2 (object1_id, object2_id) values (2, 2);
insert into object1_object2_aud (rev, revtype, object1_id, object2_id) values (1, 0, 2, 2);
insert into object1_object2 (object1_id, object2_id) values (3, 3);
insert into object1_object2_aud (rev, revtype, object1_id, object2_id) values (1, 0, 3 , 3);

insert into object3_object2 (object3_id, object2_id) values (1, 3);
insert into object3_object2_aud (rev, revtype, object3_id, object2_id) values (1, 0, 1 , 3);

insert into tf_updates_installed_by_sync (id, server_revision_tag, description) values (1, 1, 'Initial update');

SELECT pg_catalog.setval('object1_id_seq', 3, true);
SELECT pg_catalog.setval('object2_id_seq', 3, true);
SELECT pg_catalog.setval('object3_id_seq', 1, true);
SELECT pg_catalog.setval('hibernate_sequence', 1, true);
SELECT pg_catalog.setval('tf_updates_installed_by_sync_id_seq', 1, true);


