Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
schedules
Commits
c3127195
Commit
c3127195
authored
Jan 18, 2020
by
Zac Wood
Browse files
include default databse config for production
parent
615a661c
Pipeline
#5339
passed with stage
in 11 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
schedules/config/database.yml
View file @
c3127195
...
...
@@ -19,6 +19,7 @@ test:
database
:
schedules_test
production
:
<<
:
*default
database
:
<%= ENV.fetch("DB_DATABASE") { "schedules" } %>
username
:
<%= ENV.fetch("DB_USERNAME") { "" } %>
password
:
<%= ENV.fetch("DB_PASSWORD") { "" } %>
...
...
schedules/db/schema.rb
View file @
c3127195
...
...
@@ -12,7 +12,7 @@
ActiveRecord
::
Schema
.
define
(
version:
2019_12_02_013138
)
do
create_table
"closures"
,
options:
"
CREATE TABLE
\"
closures
\"
(
\n
\"
id
\"
bigint(20) NOT NULL AUTO_INCREMENT,
\n
\"
date
\"
date DEFAULT NULL,
\n
\"
semester_id
\"
bigint(20) DEFAULT NULL,
\n
\"
created_at
\"
datetime NOT NULL,
\n
\"
updated_at
\"
datetime NOT NULL,
\n
PRIMARY KEY (
\"
id
\"
),
\n
KEY
\"
index_closures_on_semester_id
\"
(
\"
semester_id
\"
),
\n
CONSTRAINT
\"
fk_rails_660c5495bf
\"
FOREIGN KEY (
\"
semester_id
\"
) REFERENCES
\"
semesters
\"
(
\"
id
\"
)
\n
)
"
,
force: :cascade
do
|
t
|
create_table
"closures"
,
options:
"
ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci
"
,
force: :cascade
do
|
t
|
t
.
date
"date"
t
.
bigint
"semester_id"
t
.
datetime
"created_at"
,
null:
false
...
...
@@ -20,7 +20,7 @@ ActiveRecord::Schema.define(version: 2019_12_02_013138) do
t
.
index
[
"semester_id"
],
name:
"index_closures_on_semester_id"
end
create_table
"course_sections"
,
options:
"
CREATE TABLE
\"
course_sections
\"
(
\n
\"
id
\"
bigint(20) NOT NULL AUTO_INCREMENT,
\n
\"
name
\"
varchar(255) DEFAULT NULL,
\n
\"
crn
\"
varchar(255) DEFAULT NULL,
\n
\"
section_type
\"
varchar(255) DEFAULT NULL,
\n
\"
title
\"
varchar(255) DEFAULT NULL,
\n
\"
start_date
\"
date DEFAULT NULL,
\n
\"
end_date
\"
date DEFAULT NULL,
\n
\"
days
\"
varchar(255) DEFAULT NULL,
\n
\"
start_time
\"
varchar(255) DEFAULT NULL,
\n
\"
end_time
\"
varchar(255) DEFAULT NULL,
\n
\"
location
\"
varchar(255) DEFAULT NULL,
\n
\"
status
\"
varchar(255) DEFAULT NULL,
\n
\"
campus
\"
varchar(255) DEFAULT NULL,
\n
\"
notes
\"
text,
\n
\"
size_limit
\"
int(11) DEFAULT NULL,
\n
\"
course_id
\"
bigint(20) DEFAULT NULL,
\n
\"
created_at
\"
datetime NOT NULL,
\n
\"
updated_at
\"
datetime NOT NULL,
\n
\"
instructor_id
\"
bigint(20) DEFAULT NULL,
\n
\"
semester_id
\"
bigint(20) DEFAULT NULL,
\n
\"
rating_questions
\"
text,
\n
PRIMARY KEY (
\"
id
\"
),
\n
KEY
\"
index_course_sections_on_course_id
\"
(
\"
course_id
\"
),
\n
KEY
\"
index_course_sections_on_instructor_id
\"
(
\"
instructor_id
\"
),
\n
KEY
\"
index_course_sections_on_semester_id
\"
(
\"
semester_id
\"
),
\n
KEY
\"
index_course_sections_on_crn
\"
(
\"
crn
\"
),
\n
CONSTRAINT
\"
fk_rails_1078854020
\"
FOREIGN KEY (
\"
semester_id
\"
) REFERENCES
\"
semesters
\"
(
\"
id
\"
),
\n
CONSTRAINT
\"
fk_rails_20b1e5de46
\"
FOREIGN KEY (
\"
course_id
\"
) REFERENCES
\"
courses
\"
(
\"
id
\"
),
\n
CONSTRAINT
\"
fk_rails_ab73264294
\"
FOREIGN KEY (
\"
instructor_id
\"
) REFERENCES
\"
instructors
\"
(
\"
id
\"
)
\n
)
"
,
force: :cascade
do
|
t
|
create_table
"course_sections"
,
options:
"
ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci
"
,
force: :cascade
do
|
t
|
t
.
string
"name"
t
.
string
"crn"
t
.
string
"section_type"
...
...
@@ -47,7 +47,7 @@ ActiveRecord::Schema.define(version: 2019_12_02_013138) do
t
.
index
[
"semester_id"
],
name:
"index_course_sections_on_semester_id"
end
create_table
"courses"
,
options:
"
CREATE TABLE
\"
courses
\"
(
\n
\"
id
\"
bigint(20) NOT NULL AUTO_INCREMENT,
\n
\"
subject
\"
varchar(255) DEFAULT NULL,
\n
\"
course_number
\"
varchar(255) DEFAULT NULL,
\n
\"
created_at
\"
datetime NOT NULL,
\n
\"
updated_at
\"
datetime NOT NULL,
\n
\"
description
\"
text,
\n
\"
credits
\"
varchar(255) DEFAULT NULL,
\n
\"
title
\"
varchar(255) DEFAULT NULL,
\n
\"
prereqs
\"
text,
\n
PRIMARY KEY (
\"
id
\"
)
\n
)
"
,
force: :cascade
do
|
t
|
create_table
"courses"
,
options:
"
ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci
"
,
force: :cascade
do
|
t
|
t
.
string
"subject"
t
.
string
"course_number"
t
.
datetime
"created_at"
,
null:
false
...
...
@@ -58,13 +58,13 @@ ActiveRecord::Schema.define(version: 2019_12_02_013138) do
t
.
text
"prereqs"
end
create_table
"instructors"
,
options:
"
CREATE TABLE
\"
instructors
\"
(
\n
\"
id
\"
bigint(20) NOT NULL AUTO_INCREMENT,
\n
\"
name
\"
varchar(255) DEFAULT NULL,
\n
\"
created_at
\"
datetime NOT NULL,
\n
\"
updated_at
\"
datetime NOT NULL,
\n
PRIMARY KEY (
\"
id
\"
)
\n
)
"
,
force: :cascade
do
|
t
|
create_table
"instructors"
,
options:
"
ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci
"
,
force: :cascade
do
|
t
|
t
.
string
"name"
t
.
datetime
"created_at"
,
null:
false
t
.
datetime
"updated_at"
,
null:
false
end
create_table
"semesters"
,
options:
"
CREATE TABLE
\"
semesters
\"
(
\n
\"
id
\"
bigint(20) NOT NULL AUTO_INCREMENT,
\n
\"
season
\"
varchar(255) DEFAULT NULL,
\n
\"
year
\"
varchar(255) DEFAULT NULL,
\n
\"
created_at
\"
datetime NOT NULL,
\n
\"
updated_at
\"
datetime NOT NULL,
\n
PRIMARY KEY (
\"
id
\"
)
\n
)
"
,
force: :cascade
do
|
t
|
create_table
"semesters"
,
options:
"
ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci
"
,
force: :cascade
do
|
t
|
t
.
string
"season"
t
.
string
"year"
t
.
datetime
"created_at"
,
null:
false
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment