diff --git a/src/main/resources/sql/fixtures/01-user.sql b/src/main/resources/sql/fixtures/01-user.sql index 9bc6ea2..2dd9151 100644 --- a/src/main/resources/sql/fixtures/01-user.sql +++ b/src/main/resources/sql/fixtures/01-user.sql @@ -4,7 +4,6 @@ declare _password text := crypt('azerty', gen_salt('bf', 8)); multiple int = coalesce(current_setting('fixture.quantity.multiple', true), '50')::int; begin - delete from "user"; insert into "user" (id, username, password, blocked_at, roles) select uuid_in(md5('user'||rn::text)::cstring), diff --git a/src/main/resources/sql/fixtures/02-citizen.sql b/src/main/resources/sql/fixtures/02-citizen.sql index fafc9a8..57fb2a6 100644 --- a/src/main/resources/sql/fixtures/02-citizen.sql +++ b/src/main/resources/sql/fixtures/02-citizen.sql @@ -1,7 +1,6 @@ do $$ begin - delete from citizen; insert into citizen (id, name, birthday, user_id, vote_anonymous, follow_anonymous, email) select uuid_in(md5('citizen'||row_number() over ()::text)::cstring), diff --git a/src/main/resources/sql/fixtures/03-workgroup.sql b/src/main/resources/sql/fixtures/03-workgroup.sql index 631e9de..832a248 100644 --- a/src/main/resources/sql/fixtures/03-workgroup.sql +++ b/src/main/resources/sql/fixtures/03-workgroup.sql @@ -8,9 +8,6 @@ declare } $roles$; begin - delete from citizen_in_workgroup; - delete from workgroup; - insert into workgroup (id, created_by_id, name, description, anonymous) select uuid_in(md5('workgroup'||rn::text)::cstring), diff --git a/src/main/resources/sql/fixtures/04-article.sql b/src/main/resources/sql/fixtures/04-article.sql index fe2bfdc..302f18d 100644 --- a/src/main/resources/sql/fixtures/04-article.sql +++ b/src/main/resources/sql/fixtures/04-article.sql @@ -11,9 +11,6 @@ declare _citizen_count int = (select count(z) from citizen z); _workgroup_count int = (select count(w) from workgroup w); begin - delete from article_relations; - delete from article; - insert into article (id, version_id, created_by_id, workgroup_id, title, anonymous, content, description, tags, created_at, draft) select uuid_in(md5('article'||row_number() over ())::cstring), diff --git a/src/main/resources/sql/fixtures/05-constitution.sql b/src/main/resources/sql/fixtures/05-constitution.sql index 1c6e4c7..65ed9fc 100644 --- a/src/main/resources/sql/fixtures/05-constitution.sql +++ b/src/main/resources/sql/fixtures/05-constitution.sql @@ -3,10 +3,6 @@ $$ declare article_count int = (select count(*) from article); begin - delete from article_in_title; - delete from title; - delete from constitution; - insert into constitution (id, version_id, created_by_id, title, anonymous, created_at) select uuid_in(md5('constitution'||row_number() over ())::cstring), diff --git a/src/main/resources/sql/fixtures/06-follow.sql b/src/main/resources/sql/fixtures/06-follow.sql index 3043cc4..e17b355 100644 --- a/src/main/resources/sql/fixtures/06-follow.sql +++ b/src/main/resources/sql/fixtures/06-follow.sql @@ -3,8 +3,6 @@ $$ declare article_count int = (select count(*) from article); begin - delete from follow; - insert into follow_article (id, created_by_id, target_id) select uuid_in(md5('follow_article'||row_number() over ())::cstring), diff --git a/src/main/resources/sql/fixtures/07-comment.sql b/src/main/resources/sql/fixtures/07-comment.sql index 930aad4..e2776b5 100644 --- a/src/main/resources/sql/fixtures/07-comment.sql +++ b/src/main/resources/sql/fixtures/07-comment.sql @@ -3,8 +3,6 @@ $$ declare article_count int = (select count(*) from article); begin - delete from comment; - insert into comment_on_article (id, created_by_id, target_id, content) select uuid_in(md5('comment_on_article'||row_number() over ())::cstring), diff --git a/src/main/resources/sql/fixtures/08-vote.sql b/src/main/resources/sql/fixtures/08-vote.sql index ccf37a3..28c0a63 100644 --- a/src/main/resources/sql/fixtures/08-vote.sql +++ b/src/main/resources/sql/fixtures/08-vote.sql @@ -3,11 +3,6 @@ $$ declare article_count int = (select count(*) from article); begin - delete from vote_for_article; - delete from vote_for_constitution; - delete from vote_for_comment_on_article; - delete from vote_for_comment_on_constitution; - insert into vote_for_article (id, created_by_id, target_id, note, anonymous) select uuid_in(md5('vote_for_article'||row_number() over ())::cstring), diff --git a/src/main/resources/sql/fixtures/09-opinion.sql b/src/main/resources/sql/fixtures/09-opinion.sql index 9665b52..7965f56 100644 --- a/src/main/resources/sql/fixtures/09-opinion.sql +++ b/src/main/resources/sql/fixtures/09-opinion.sql @@ -3,9 +3,6 @@ $$ declare article_count int = (select count(*) from article); begin - delete from opinion_on_article; - delete from opinion_choice; - insert into opinion_choice (id, name, target) select uuid_in(md5('opinion_choice'||row_number() over ())::cstring),