-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add some seed users & lectures (#129)
* add some seed users & lectures * remove unused var * adapt seed data to have a course * Adjust seed data to new DB Schema of lectures Co-authored-by: Lasse Jahn <[email protected]>
- Loading branch information
1 parent
c9b18fc
commit e7470a4
Showing
1 changed file
with
10 additions
and
7 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,9 +1,12 @@ | ||
# This file should contain all the record creation needed to seed the database with its default values. | ||
# The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup). | ||
# | ||
# Examples: | ||
# | ||
# movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }]) | ||
# Character.create(name: 'Luke', movie: movies.first) | ||
Lecture.create(name: "swt", enrollment_key: "epic", status: "created") | ||
User.create(email: "[email protected]", password: "1234567890", password_confirmation: "1234567890") | ||
|
||
lecturer_1 = User.create(is_student: false, email: "[email protected]", password: "1234567890", password_confirmation: "1234567890") | ||
User.create(is_student: true, email: "[email protected]", password: "1234567890", password_confirmation: "1234567890") | ||
User.create(is_student: true, email: "[email protected]", password: "1234567890", password_confirmation: "1234567890") | ||
|
||
course_1 = Course.create(name: "<Kurs-1>", description: "Testkurs #1", creator: lecturer_1) | ||
|
||
Lecture.create(name: "<Created Lecture>", enrollment_key: "epic", status: "created", lecturer: lecturer_1, course: course_1, date: "2019-12-31", start_time: "2019-12-31 23:59:00", end_time: "2020-01-01 00:01:00") | ||
Lecture.create(name: "<Running Lecture>", enrollment_key: "epic", status: "running", lecturer: lecturer_1, course: course_1, date: "2019-12-31", start_time: "2019-12-31 23:59:00", end_time: "2020-01-01 00:01:00") | ||
Lecture.create(name: "<Ended Lecture>", enrollment_key: "epic", status: "ended", lecturer: lecturer_1, course: course_1, date: "2019-12-31", start_time: "2019-12-31 23:59:00", end_time: "2020-01-01 00:01:00") |