Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
snip
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
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
irp
snip
Commits
67b57000
Commit
67b57000
authored
2 years ago
by
Markus Osterhoff
Browse files
Options
Downloads
Patches
Plain Diff
small fixes on mariadDB_create_emptyDB.sql
but probably not yet fully perfect
parent
4080f16b
Branches
p10_old
No related tags found
1 merge request
!3
first changes @ P10 beamline
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/mariadDB_create_emptyDB.sql
+2
-13
2 additions, 13 deletions
scripts/mariadDB_create_emptyDB.sql
with
2 additions
and
13 deletions
scripts/mariadDB_create_emptyDB.sql
+
2
−
13
View file @
67b57000
...
@@ -263,16 +263,6 @@ CREATE TRIGGER `ins_last_updated_pages` AFTER INSERT ON `snips` FOR EACH ROW UPD
...
@@ -263,16 +263,6 @@ CREATE TRIGGER `ins_last_updated_pages` AFTER INSERT ON `snips` FOR EACH ROW UPD
WHERE
pages
.
id
=
NEW
.
page_id
WHERE
pages
.
id
=
NEW
.
page_id
$$
$$
DELIMITER
;
DELIMITER
;
-- Trigger
DELIMITER
$$
CREATE
TRIGGER
`ins_last_updated_pages`
AFTER
INSERT
ON
`books`
FOR
EACH
ROW
UPDATE
pages
SET
pages
.
last_updated
=
current_timestamp
()
WHERE
pages
.
id
=
NEW
.
page_id
$$
DELIMITER
;
DELIMITER
$$
DELIMITER
$$
CREATE
TRIGGER
`upd_last_updated_books`
AFTER
UPDATE
ON
`pages`
FOR
EACH
ROW
UPDATE
books
CREATE
TRIGGER
`upd_last_updated_books`
AFTER
UPDATE
ON
`pages`
FOR
EACH
ROW
UPDATE
books
SET
books
.
last_updated
=
CURRENT_TIMESTAMP
()
SET
books
.
last_updated
=
CURRENT_TIMESTAMP
()
...
@@ -281,8 +271,7 @@ $$
...
@@ -281,8 +271,7 @@ $$
DELIMITER
;
DELIMITER
;
DELIMITER
$$
DELIMITER
$$
CREATE
TRIGGER
`upd_last_updated_pages`
AFTER
UPDATE
ON
`snips`
FOR
EACH
ROW
UPDATE
pages
CREATE
TRIGGER
`upd_last_updated_pages`
AFTER
UPDATE
ON
`snips`
FOR
EACH
ROW
UPDATE
pages
SET
pages
.
last_updated
=
current_timestamp
()
WHERE
pages
.
id
=
NEW
.
page_id
,
SET
pages
.
last_updated
=
current_timestamp
()
WHERE
pages
.
id
=
NEW
.
page_id
SET
NEW
.
last_updated
=
current_timestamp
()
$$
$$
DELIMITER
;
DELIMITER
;
...
@@ -322,4 +311,4 @@ FLUSH PRIVILEGES;
...
@@ -322,4 +311,4 @@ FLUSH PRIVILEGES;
-- Add background type to books table
-- Add background type to books table
ALTER
TABLE
books
ADD
background_type_id
INT
NOT
NULL
DEFAULT
1
,
ALTER
TABLE
books
ADD
background_type_id
INT
NOT
NULL
DEFAULT
1
,
ADD
FOREIGN
KEY
(
background_type_id
)
REFERENCES
background_types
(
id
);
ADD
FOREIGN
KEY
(
background_type_id
)
REFERENCES
background_types
(
id
);
\ 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