-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #70 from JimTheCat/CU-8696y6vhb_Create-database_Ki…
…nga-Traczyk Cu 8696y6vhb create database kinga traczyk
- Loading branch information
Showing
20 changed files
with
1,387 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,12 @@ | ||
# MeowHub | ||
Engineering Thesis | ||
|
||
## Database | ||
If you don't have a created database yet, run script `database/install.sql`. | ||
|
||
## Profiles | ||
`dev` - to run application with H2 database and enabled swagger | ||
|
||
## Swagger | ||
To run swagger use `dev` profile. | ||
Link to swagger documentation: http://localhost:8080/swagger-ui/index.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
WHENEVER SQLERROR EXIT SQL.SQLCODE; | ||
|
||
--drop | ||
@scripts/000_drop_schemas.sql | ||
@scripts/010_drop_profiles.sql | ||
|
||
--create | ||
@scripts/100_create_profiles.sql | ||
@scripts/110_create_schemas.sql | ||
@scripts/120_create_tables.sql | ||
@scripts/121_create_h_tables.sql | ||
@scripts/130_grant_references.sql | ||
@scripts/140_create_references.sql | ||
@scripts/150_grant_permissions_to_meowhub.sql | ||
@scripts/160_create_indexes.sql | ||
|
||
--plsql objects | ||
@scripts/300_set_session_attributes.pls | ||
@scripts/310_clear_session_attributes.pls | ||
@scripts/320_get_user_id.pls | ||
@scripts/321_grant_execute_on_get_user_id.sql | ||
|
||
--triggers | ||
@scripts/400_create_audit_triggers.sql | ||
@scripts/401_create_h_tables_triggers.sql | ||
|
||
--insert | ||
@scripts/500_insert_dictionaries.sql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
DROP USER mh_meowhub CASCADE; | ||
DROP USER mh_posts CASCADE; | ||
DROP USER mh_profiles CASCADE; | ||
DROP USER mh_matching CASCADE; | ||
DROP USER mh_groups CASCADE; | ||
DROP USER mh_users CASCADE; | ||
DROP USER mh_user_relations CASCADE; | ||
DROP USER mh_chats CASCADE; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DROP PROFILE mh_profile; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
CREATE PROFILE mh_profile LIMIT | ||
PASSWORD_LIFE_TIME UNLIMITED | ||
PASSWORD_VERIFY_FUNCTION NULL | ||
SESSIONS_PER_USER UNLIMITED | ||
CPU_PER_SESSION 300 | ||
CONNECT_TIME 60 | ||
IDLE_TIME 5; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
CREATE USER mh_meowhub IDENTIFIED BY "Mwhb2024!" PROFILE mh_profile; | ||
GRANT CONNECT, RESOURCE TO mh_meowhub; | ||
|
||
CREATE USER mh_chats IDENTIFIED BY "Mwhb2024!mwhb" ACCOUNT LOCK; | ||
ALTER USER mh_chats QUOTA 200M ON DATA; | ||
|
||
CREATE USER mh_groups IDENTIFIED BY "Mwhb2024!mwhb" ACCOUNT LOCK; | ||
ALTER USER mh_groups QUOTA 50M ON DATA; | ||
|
||
CREATE USER mh_users IDENTIFIED BY "Mwhb2024!mwhb" ACCOUNT LOCK; | ||
ALTER USER mh_users QUOTA 100M ON DATA; | ||
|
||
CREATE USER mh_matching IDENTIFIED BY "Mwhb2024!mwhb" ACCOUNT LOCK; | ||
ALTER USER mh_matching QUOTA 100M ON DATA; | ||
|
||
CREATE USER mh_posts IDENTIFIED BY "Mwhb2024!mwhb" ACCOUNT LOCK; | ||
ALTER USER mh_posts QUOTA 200M ON DATA; | ||
|
||
CREATE USER mh_profiles IDENTIFIED BY "Mwhb2024!mwhb" ACCOUNT LOCK; | ||
ALTER USER mh_profiles QUOTA 200M ON DATA; | ||
|
||
CREATE USER mh_user_relations IDENTIFIED BY "Mwhb2024!mwhb" ACCOUNT LOCK; | ||
ALTER USER mh_user_relations QUOTA 50M ON DATA; |
Oops, something went wrong.