Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
rosettaExitStrategy
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
Digital Preservation
rosettaExitStrategy
Commits
03161377
Commit
03161377
authored
1 year ago
by
Andreas Romeyke
Browse files
Options
Downloads
Patches
Plain Diff
- added missed indices
- added view to operate on non-deleted aips
parent
b204dbef
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
perl/exit_strategy.pl
+14
-4
14 additions, 4 deletions
perl/exit_strategy.pl
with
14 additions
and
4 deletions
perl/exit_strategy.pl
+
14
−
4
View file @
03161377
...
@@ -324,22 +324,32 @@ SQL_DELETE_PLAN
...
@@ -324,22 +324,32 @@ SQL_DELETE_PLAN
###############################################################################
###############################################################################
sub
write_index_creation
($dbh) {
sub
write_index_creation
($dbh) {
my
$sql1
=
<<"SQL_INDEX1";
my
$sql1
=
<<"SQL_INDEX1";
CREATE UNIQUE INDEX aip_index ON aip (ie_id, version
ASC
);
CREATE UNIQUE INDEX aip_index ON aip (ie_id, version);
SQL_INDEX1
SQL_INDEX1
my
$sql2
=
<<"SQL_INDEX2";
my
$sql2
=
<<"SQL_INDEX2";
CREATE UNIQUE INDEX sourcedata_index ON sourcedatafile (aip_id, name);
CREATE UNIQUE INDEX sourcedata_index ON sourcedatafile (aip_id, name);
SQL_INDEX2
SQL_INDEX2
my
$sql3
=
<<"SQL_INDEX3";
my
$sql3
=
<<"SQL_INDEX3";
CREATE INDEX delete_index ON deleted (aip_id
ASC
);
CREATE INDEX delete_index ON deleted (aip_id);
SQL_INDEX3
SQL_INDEX3
my
$sql4
=
<<"SQL_INDEX4";
my
$sql4
=
<<"SQL_INDEX4";
CREATE INDEX aip_index2 ON aip (lza_id
ASC
);
CREATE INDEX aip_index2 ON aip (lza_id);
SQL_INDEX4
SQL_INDEX4
my
$sql5
=
<<"SQL_INDEX5";
CREATE INDEX aip_index3 ON aip (ie_id,lza_id);
SQL_INDEX5
my
$sql6
=
<<"SQL_VIEW";
CREATE VIEW non_deleted_aip(id,ie_id,lza_id,version,dir_path) AS
SELECT * FROM aip WHERE aip.id NOT IN (
SELECT aip_id FROM deleted
);
SQL_VIEW
my
$sth1
=
$dbh
->
prepare
(
$sql1
);
$sth1
->
execute
()
or
die
"
sql problem detected
",
$dbh
->
errstr
;
my
$sth1
=
$dbh
->
prepare
(
$sql1
);
$sth1
->
execute
()
or
die
"
sql problem detected
",
$dbh
->
errstr
;
my
$sth2
=
$dbh
->
prepare
(
$sql2
);
$sth2
->
execute
()
or
die
"
sql problem detected
",
$dbh
->
errstr
;
my
$sth2
=
$dbh
->
prepare
(
$sql2
);
$sth2
->
execute
()
or
die
"
sql problem detected
",
$dbh
->
errstr
;
my
$sth3
=
$dbh
->
prepare
(
$sql3
);
$sth3
->
execute
()
or
die
"
sql problem detected
",
$dbh
->
errstr
;
my
$sth3
=
$dbh
->
prepare
(
$sql3
);
$sth3
->
execute
()
or
die
"
sql problem detected
",
$dbh
->
errstr
;
my
$sth4
=
$dbh
->
prepare
(
$sql4
);
$sth4
->
execute
()
or
die
"
sql problem detected
",
$dbh
->
errstr
;
my
$sth4
=
$dbh
->
prepare
(
$sql4
);
$sth4
->
execute
()
or
die
"
sql problem detected
",
$dbh
->
errstr
;
my
$sth5
=
$dbh
->
prepare
(
$sql5
);
$sth5
->
execute
()
or
die
"
sql problem detected
",
$dbh
->
errstr
;
my
$sth6
=
$dbh
->
prepare
(
$sql6
);
$sth6
->
execute
()
or
die
"
sql problem detected
",
$dbh
->
errstr
;
return
1
;
return
1
;
}
}
...
...
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