Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions DDL_gerenciadorPontos.sql
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ CREATE TABLE rules (
deleted_at TIMESTAMP NULL DEFAULT NULL
);


CREATE TABLE events (
id INTEGER AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(50),
Expand All @@ -63,9 +64,13 @@ CREATE TABLE rules_categories (
id INTEGER AUTO_INCREMENT PRIMARY KEY,
active_ BOOLEAN,
rules_id INTEGER,
categories_id INTEGER
categories_id INTEGER,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP(),
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP(),
deleted_at TIMESTAMP NULL DEFAULT NULL
);


CREATE TABLE events_members (
id INTEGER AUTO_INCREMENT PRIMARY KEY,
members_id INTEGER,
Expand Down Expand Up @@ -127,7 +132,7 @@ CREATE TABLE badges_members (
);
CREATE TABLE scores (
score_id INTEGER AUTO_INCREMENT PRIMARY KEY,
multiplier_value INTEGER,
multiplier_value INTEGER DEFAULT 1,
members_id INTEGER,
events_id INTEGER,
categories_id INTEGER,
Expand All @@ -139,6 +144,7 @@ CREATE TABLE scores (





ALTER TABLE seasons ADD CONSTRAINT FK_season_enterprise
FOREIGN KEY (enterprises_id)
Expand Down Expand Up @@ -249,5 +255,4 @@ ALTER TABLE scores ADD CONSTRAINT FK_scores_5
REFERENCES rules (id)
ON DELETE CASCADE;