Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MaarchCourrier
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Harbor Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maarch
MaarchCourrier
Commits
06d5ff00
Commit
06d5ff00
authored
6 years ago
by
Damien
Browse files
Options
Downloads
Patches
Plain Diff
FIX #7704 Add user_signatures on delete all resources
parent
7034aa50
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sql/delete_all_ressources.sql
+83
-81
83 additions, 81 deletions
sql/delete_all_ressources.sql
with
83 additions
and
81 deletions
sql/delete_all_ressources.sql
+
83
−
81
View file @
06d5ff00
/* Warning : This script erase all data in the application Maarch. It keeps in database parameters */
/* Warning : This script erase all data in the application Maarch. It keeps in database parameters */
TRUNCATE
TABLE
cases
;
TRUNCATE
TABLE
cases
;
ALTER
SEQUENCE
case_id_seq
restart
WITH
1
;
ALTER
SEQUENCE
case_id_seq
restart
WITH
1
;
TRUNCATE
TABLE
cases_res
;
TRUNCATE
TABLE
cases_res
;
/*TRUNCATE TABLE contacts_v2;
/*TRUNCATE TABLE contacts_v2;
ALTER SEQUENCE contact_v2_id_seq restart WITH 1;
ALTER SEQUENCE contact_v2_id_seq restart WITH 1;
TRUNCATE TABLE contact_addresses;
TRUNCATE TABLE contact_addresses;
ALTER SEQUENCE contact_addresses_id_seq restart WITH 1;
ALTER SEQUENCE contact_addresses_id_seq restart WITH 1;
TRUNCATE TABLE contact_types;
TRUNCATE TABLE contact_types;
ALTER SEQUENCE contact_types_id_seq restart WITH 1;
ALTER SEQUENCE contact_types_id_seq restart WITH 1;
TRUNCATE TABLE contact_purposes;
TRUNCATE TABLE contact_purposes;
ALTER SEQUENCE contact_purposes_id_seq restart WITH 1;*/
ALTER SEQUENCE contact_purposes_id_seq restart WITH 1;*/
TRUNCATE
TABLE
contacts_res
;
TRUNCATE
TABLE
contacts_res
;
TRUNCATE
TABLE
listinstance
;
TRUNCATE
TABLE
listinstance
;
ALTER
SEQUENCE
listinstance_id_seq
restart
WITH
1
;
ALTER
SEQUENCE
listinstance_id_seq
restart
WITH
1
;
TRUNCATE
TABLE
listinstance_history
;
TRUNCATE
TABLE
listinstance_history
;
ALTER
SEQUENCE
listinstance_history_id_seq
restart
WITH
1
;
ALTER
SEQUENCE
listinstance_history_id_seq
restart
WITH
1
;
TRUNCATE
TABLE
listinstance_history_details
;
TRUNCATE
TABLE
listinstance_history_details
;
ALTER
SEQUENCE
listinstance_history_details_id_seq
restart
WITH
1
;
ALTER
SEQUENCE
listinstance_history_details_id_seq
restart
WITH
1
;
TRUNCATE
TABLE
history
;
TRUNCATE
TABLE
history
;
ALTER
SEQUENCE
history_id_seq
restart
WITH
1
;
ALTER
SEQUENCE
history_id_seq
restart
WITH
1
;
TRUNCATE
TABLE
history_batch
;
TRUNCATE
TABLE
history_batch
;
ALTER
SEQUENCE
history_batch_id_seq
restart
WITH
1
;
ALTER
SEQUENCE
history_batch_id_seq
restart
WITH
1
;
TRUNCATE
TABLE
notes
;
TRUNCATE
TABLE
notes
;
ALTER
SEQUENCE
notes_seq
restart
WITH
1
;
ALTER
SEQUENCE
notes_seq
restart
WITH
1
;
TRUNCATE
TABLE
note_entities
;
TRUNCATE
TABLE
note_entities
;
TRUNCATE
TABLE
mlb_coll_ext
;
TRUNCATE
TABLE
mlb_coll_ext
;
TRUNCATE
TABLE
res_letterbox
;
TRUNCATE
TABLE
res_letterbox
;
ALTER
SEQUENCE
res_id_mlb_seq
restart
WITH
1
;
ALTER
SEQUENCE
res_id_mlb_seq
restart
WITH
1
;
TRUNCATE
TABLE
res_version_letterbox
;
TRUNCATE
TABLE
res_version_letterbox
;
TRUNCATE
TABLE
res_x
;
TRUNCATE
TABLE
res_x
;
ALTER
SEQUENCE
res_id_seq
restart
WITH
1
;
ALTER
SEQUENCE
res_id_seq
restart
WITH
1
;
TRUNCATE
TABLE
res_attachments
;
TRUNCATE
TABLE
res_attachments
;
ALTER
SEQUENCE
res_attachment_res_id_seq
restart
WITH
1
;
ALTER
SEQUENCE
res_attachment_res_id_seq
restart
WITH
1
;
TRUNCATE
TABLE
res_version_attachments
;
TRUNCATE
TABLE
res_version_attachments
;
TRUNCATE
TABLE
res_linked
;
TRUNCATE
TABLE
res_linked
;
TRUNCATE
TABLE
res_mark_as_read
;
TRUNCATE
TABLE
res_mark_as_read
;
TRUNCATE
TABLE
saved_queries
;
TRUNCATE
TABLE
saved_queries
;
TRUNCATE
TABLE
lc_stack
;
TRUNCATE
TABLE
lc_stack
;
TRUNCATE
TABLE
adr_x
;
TRUNCATE
TABLE
adr_x
;
TRUNCATE
TABLE
tags
;
TRUNCATE
TABLE
tags
;
ALTER
SEQUENCE
tag_id_seq
restart
WITH
1
;
ALTER
SEQUENCE
tag_id_seq
restart
WITH
1
;
TRUNCATE
TABLE
tags_entities
;
TRUNCATE
TABLE
tags_entities
;
TRUNCATE
TABLE
tag_res
;
TRUNCATE
TABLE
tag_res
;
TRUNCATE
TABLE
sendmail
;
TRUNCATE
TABLE
sendmail
;
TRUNCATE
TABLE
notif_event_stack
;
TRUNCATE
TABLE
notif_event_stack
;
ALTER
SEQUENCE
notif_event_stack_seq
restart
WITH
1
;
ALTER
SEQUENCE
notif_event_stack_seq
restart
WITH
1
;
TRUNCATE
TABLE
notif_email_stack
;
TRUNCATE
TABLE
notif_email_stack
;
ALTER
SEQUENCE
notif_email_stack_seq
restart
WITH
1
;
ALTER
SEQUENCE
notif_email_stack_seq
restart
WITH
1
;
TRUNCATE
TABLE
user_signatures
;
/* reset chrono */
ALTER
SEQUENCE
user_signatures_id_seq
restart
WITH
1
;
UPDATE
parameters
SET
param_value_int
=
'1'
WHERE
id
=
'chrono_outgoing_'
||
extract
(
YEAR
FROM
current_date
);
UPDATE
parameters
SET
param_value_int
=
'1'
WHERE
id
=
'chrono_incoming_'
||
extract
(
YEAR
FROM
current_date
);
/* reset chrono */
UPDATE
parameters
SET
param_value_int
=
'1'
WHERE
id
=
'chrono_internal_'
||
extract
(
YEAR
FROM
current_date
);
UPDATE
parameters
SET
param_value_int
=
'1'
WHERE
id
=
'chrono_outgoing_'
||
extract
(
YEAR
FROM
current_date
);
UPDATE
parameters
SET
param_value_int
=
'1'
WHERE
id
=
'chrono_incoming_'
||
extract
(
YEAR
FROM
current_date
);
UPDATE
parameters
SET
param_value_int
=
'1'
WHERE
id
=
'chrono_internal_'
||
extract
(
YEAR
FROM
current_date
);
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment