-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmigration_cas_db.sh
executable file
·48 lines (43 loc) · 1.41 KB
/
migration_cas_db.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# pip install peewee==3.9.6
# pip install peewee-migrations==0.3.18
rm -f migrations_cas.json 2> /dev/null
pem init
# See: https://stackoverflow.com/questions/394230/how-to-detect-the-os-from-a-bash-script/18434831
if [[ "$OSTYPE" == "linux-gnu" ]]; then
# Linux
sed -i 's/migrate/cas_migrations/g/' migrations_cas.json
elif [[ "$OSTYPE" == "darwin"* ]]; then
# Mac OSX
sed -i '' 's/migrate/cas_migrations/g/' migrations_cas.json
elif [[ "$OSTYPE" == "win64" ]]; then
#windows operating system
sed -i '' 's/migrate/cas_migrations/g/' migrations_cas.json
fi
#pem add app.models.[filename].[classname]
pem add app.models.Division
pem add app.models.BannerSchedule
pem add app.models.TermStates
pem add app.models.Building
pem add app.models.EducationTech
pem add app.models.Deadline
pem add app.models.ScheduleDays
pem add app.models.Term
pem add app.models.Rooms
pem add app.models.Program
pem add app.models.Subject
pem add app.models.User
pem add app.models.BannerCourses
pem add app.models.Course
pem add app.models.CrossListed
pem add app.models.SpecialTopicCourse
pem add app.models.ProgramChair
pem add app.models.DivisionChair
pem add app.models.BuildingManager
pem add app.models.InstructorCourse
pem add app.models.InstructorSTCourse
pem add app.models.CourseChange
pem add app.models.InstructorCourseChange
pem add app.models.CoursesInBanner
pem add app.models.RoomPreferences
pem watch
pem migrate