Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
corps-directory
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
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
fhurtado14
corps-directory
Commits
ba1b86ab
Commit
ba1b86ab
authored
6 months ago
by
Federico Hurtado
Browse files
Options
Downloads
Patches
Plain Diff
redeploy tables with new schema.
parent
559aa60c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
backend/config/database/schema.sql
+23
-3
23 additions, 3 deletions
backend/config/database/schema.sql
with
23 additions
and
3 deletions
backend/config/database/schema.sql
+
23
−
3
View file @
ba1b86ab
DROP
TABLE
IF
EXISTS
userLoginLogout
;
DROP
TABLE
IF
EXISTS
users
;
DROP
TABLE
IF
EXISTS
rolesPermissions
;
-- Roles permissions table
CREATE
TABLE
rolesPermissions
(
roleID
INT
PRIMARY
KEY
,
permissionLevel
VARCHAR
(
255
)
NOT
NULL
,
permissionLevelDescription
VARCHAR
(
255
)
NOT
NULL
);
-- Users table (Users are the login profiles for people)
CREATE
TABLE
users
(
userID
INT
AUTO_INCREMENT
PRIMARY
KEY
,
username
VARCHAR
(
255
)
NOT
NULL
,
roleID
INT
NOT
NULL
,
FOREIGN
KEY
(
roleID
)
REFERENCES
rolesPermissions
(
roleID
)
);
-- Table to log login/logout information
CREATE
TABLE
userLoginLogout
(
eventId
INT
AUTO_INCREMENT
PRIMARY
KEY
,
eventTimestamp
TIMESTAMP
DEFAULT
CURRENT_TIMESTAMP
,
userID
INT
NOT
NULL
,
eventType
VARCHAR
(
255
)
NOT
NULL
,
-- successfulLogin, unsuccessfulLogin, logout
FOREIGN
KEY
(
userID
)
REFERENCES
users
(
userID
)
);
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