Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
howto.doc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Documentations
howto.doc
Commits
b02ff3f2
Commit
b02ff3f2
authored
4 years ago
by
Henri Queneau
Browse files
Options
Downloads
Patches
Plain Diff
Add new file
parent
777be572
No related branches found
Branches containing commit
No related tags found
2 merge requests
!14
Mise à jour arborescence
,
!13
1.0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
exploitation/deleteAllResources.md
+86
-0
86 additions, 0 deletions
exploitation/deleteAllResources.md
with
86 additions
and
0 deletions
exploitation/deleteAllResources.md
0 → 100644
+
86
−
0
View file @
b02ff3f2
Ce script permet de purger la base de données:
```
sql
TRUNCATE
TABLE
listinstance
;
ALTER
SEQUENCE
listinstance_id_seq
restart
WITH
1
;
TRUNCATE
TABLE
listinstance_history
;
ALTER
SEQUENCE
listinstance_history_id_seq
restart
WITH
1
;
TRUNCATE
TABLE
listinstance_history_details
;
ALTER
SEQUENCE
listinstance_history_details_id_seq
restart
WITH
1
;
TRUNCATE
TABLE
history
;
ALTER
SEQUENCE
history_id_seq
restart
WITH
1
;
TRUNCATE
TABLE
history_batch
;
ALTER
SEQUENCE
history_batch_id_seq
restart
WITH
1
;
TRUNCATE
TABLE
notes
;
ALTER
SEQUENCE
notes_id_seq
restart
WITH
1
;
TRUNCATE
TABLE
note_entities
;
TRUNCATE
TABLE
res_letterbox
;
ALTER
SEQUENCE
res_id_mlb_seq
restart
WITH
1
;
TRUNCATE
TABLE
res_attachments
;
ALTER
SEQUENCE
res_attachment_res_id_seq
restart
WITH
1
;
TRUNCATE
TABLE
adr_letterbox
;
ALTER
SEQUENCE
adr_letterbox_id_seq
restart
WITH
1
;
TRUNCATE
TABLE
adr_attachments
;
ALTER
SEQUENCE
adr_attachments_id_seq
restart
WITH
1
;
TRUNCATE
TABLE
res_mark_as_read
;
TRUNCATE
TABLE
lc_stack
;
TRUNCATE
TABLE
tags
;
ALTER
SEQUENCE
tags_id_seq
restart
WITH
1
;
TRUNCATE
TABLE
resources_tags
;
TRUNCATE
TABLE
emails
;
TRUNCATE
TABLE
notif_event_stack
;
ALTER
SEQUENCE
notif_event_stack_seq
restart
WITH
1
;
TRUNCATE
TABLE
notif_email_stack
;
ALTER
SEQUENCE
notif_email_stack_seq
restart
WITH
1
;
TRUNCATE
TABLE
user_signatures
;
ALTER
SEQUENCE
user_signatures_id_seq
restart
WITH
1
;
TRUNCATE
TABLE
acknowledgement_receipts
;
ALTER
SEQUENCE
acknowledgement_receipts_id_seq
restart
WITH
1
;
TRUNCATE
TABLE
emails
;
ALTER
SEQUENCE
emails_id_seq
restart
WITH
1
;
TRUNCATE
TABLE
registered_mail_resources
;
ALTER
SEQUENCE
registered_mail_resources_id_seq
restart
WITH
1
;
TRUNCATE
TABLE
resource_contacts
;
ALTER
SEQUENCE
resource_contacts_id_seq
restart
WITH
1
;
TRUNCATE
TABLE
resources_folders
;
ALTER
SEQUENCE
resources_folders_id_seq
restart
WITH
1
;
TRUNCATE
TABLE
unit_identifier
;
TRUNCATE
TABLE
users_followed_resources
;
ALTER
SEQUENCE
users_followed_resources_id_seq
restart
WITH
1
;
TRUNCATE
TABLE
message_exchange
;
TRUNCATE
TABLE
shippings
;
ALTER
SEQUENCE
shippings_id_seq
restart
WITH
1
;
/* reset chrono */
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
);
```
\ No newline at end of file
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