Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ASE_Y2S1_CP_G4
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Joshua Gill
ASE_Y2S1_CP_G4
Commits
d38b32b5
Commit
d38b32b5
authored
3 years ago
by
Seb Barnard
Browse files
Options
Downloads
Patches
Plain Diff
Added correct scheme
parent
59376b5a
No related branches found
No related tags found
2 merge requests
!114
LoggingService service class, new method to add a log to the "Logs" table when...
,
!95
Issue thirty four
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/resources/database/schema.sql
+1
-21
1 addition, 21 deletions
src/main/resources/database/schema.sql
with
1 addition
and
21 deletions
src/main/resources/database/schema.sql
+
1
−
21
View file @
d38b32b5
...
@@ -130,6 +130,7 @@ CREATE TABLE IF NOT EXISTS `mydb`.`Shops` (
...
@@ -130,6 +130,7 @@ CREATE TABLE IF NOT EXISTS `mydb`.`Shops` (
`Shop_Earnings`
INT
NOT
NULL
,
`Shop_Earnings`
INT
NOT
NULL
,
`Shop_Countries`
VARCHAR
(
150
)
NOT
NULL
,
`Shop_Countries`
VARCHAR
(
150
)
NOT
NULL
,
`Shop_Image`
VARCHAR
(
150
),
`Shop_Image`
VARCHAR
(
150
),
`Shop_Banner`
VARCHAR
(
150
),
`Shop_Active`
TINYINT
NOT
NULL
,
`Shop_Active`
TINYINT
NOT
NULL
,
`Stamp_Board_Id`
INT
NOT
NULL
,
`Stamp_Board_Id`
INT
NOT
NULL
,
`Category_Id`
INT
NOT
NULL
,
`Category_Id`
INT
NOT
NULL
,
...
@@ -294,24 +295,3 @@ INSERT INTO Tags (Tag_Name) VALUES ('Beauty');
...
@@ -294,24 +295,3 @@ INSERT INTO Tags (Tag_Name) VALUES ('Beauty');
INSERT
INTO
Tags
(
Tag_Name
)
VALUES
(
'Eco-friendly'
);
INSERT
INTO
Tags
(
Tag_Name
)
VALUES
(
'Eco-friendly'
);
INSERT
INTO
Tags
(
Tag_Name
)
VALUES
(
'Decorations'
);
INSERT
INTO
Tags
(
Tag_Name
)
VALUES
(
'Decorations'
);
INSERT
INTO
Tags
(
Tag_Name
)
VALUES
(
'Photography'
);
INSERT
INTO
Tags
(
Tag_Name
)
VALUES
(
'Photography'
);
DROP
PROCEDURE
IF
EXISTS
`deleteShop`
;
DELIMITER
$$
CREATE
PROCEDURE
`deleteShop`
(
in
Shop_Id_In
varchar
(
6
))
BEGIN
DELETE
FROM
user_shop_links
WHERE
Shop_Id
=
Shop_Id_In
;
DELETE
FROM
socials
WHERE
Shop_Id
=
Shop_Id_In
;
DELETE
FROM
shop_tag_links
WHERE
Shop_Id
=
Shop_Id_In
;
DELETE
FROM
user_permissions
WHERE
Shop_Id
=
Shop_Id_In
;
SELECT
@
StampBoardID_var
:
=
Stamp_Board_Id
FROM
shops
WHERE
Shop_Id
=
Shop_Id_In
;
SET
FOREIGN_KEY_CHECKS
=
0
;
DELETE
FROM
rewards
WHERE
Stamp_Board_Id
=
@
StampBoardID_var
;
DELETE
FROM
stamp_boards
WHERE
Stamp_Board_Id
=
@
StampBoardID_var
;
DELETE
FROM
user_stamp_boards
WHERE
Stamp_Board_Id
=
(
SELECT
Stamp_Board_Id
FROM
shops
WHERE
Shop_Id
=
Shop_Id_In
);
-- some reason this table wouldn't delete so I used this
DELETE
FROM
shops
WHERE
Shop_Id
=
Shop_Id_In
;
SET
FOREIGN_KEY_CHECKS
=
1
;
END
$$
DELIMITER
;
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