The data.sql file in the backend directory is responsible for inserting all majors to the database. It can be viewed here.
Here is how each major should be added:
In the INSERT INTO MajornEmphasis statement under VALUES, append each major within a single tuple.
In the statement that inserts to Classes under VALUES, append all classes required for that major, with each class within a single tuple.
In the statement that inserts to Prereqs under VALUES, append all pre-requisites for any classes in Classes that require a pre-requisite, with each pre-requisite in a single tuple. If a class has multiple pre-requisites, add them into distinct tuples.
In the statement that inserts to MajorReqs under VALUES, append all classes that are required for a certain major. The RecommendedOrder column is the sorted list which the algorithm searches through when building the four-year plan, with 1 being the first class in that list.
In order to figure out what columns are in which tables, you can try connecting to the database with MySQL Workbench (or with backend.sh -l in the backend/ directory) and run the query DESCRIBE <Table-Name>. Run SHOW tables to see what tables are in the database.
This is a lot of work, so each major can be added in a single branch. For instance, the Finance major can be done in a branch named issue-63/Finance-Major. You can create a new branch from master (you can do this with git checkout master && git pull) on your terminal with git checkout -b issue-63/Finance-Major.
When you are sure you want to finalize your changes and push to GitHub:
git status -- make sure you are on the issue-63/Finance-Major branch (Git will tell you)
git add data.sql
git commit -m "explanation of changes"
git push -u origin issue-63/Finance-Major
If you don't have Git installed, click here to see how.
The
data.sql
file in thebackend
directory is responsible for inserting all majors to the database. It can be viewed here.Here is how each major should be added:
INSERT INTO MajornEmphasis
statement underVALUES
, append each major within a single tuple.Classes
underVALUES
, append all classes required for that major, with each class within a single tuple.Prereqs
underVALUES
, append all pre-requisites for any classes inClasses
that require a pre-requisite, with each pre-requisite in a single tuple. If a class has multiple pre-requisites, add them into distinct tuples.MajorReqs
underVALUES
, append all classes that are required for a certain major. TheRecommendedOrder
column is the sorted list which the algorithm searches through when building the four-year plan, with1
being the first class in that list.In order to figure out what columns are in which tables, you can try connecting to the database with MySQL Workbench (or with
backend.sh -l
in thebackend/
directory) and run the queryDESCRIBE <Table-Name>
. RunSHOW tables
to see what tables are in the database.This is a lot of work, so each major can be added in a single branch. For instance, the Finance major can be done in a branch named
issue-63/Finance-Major
. You can create a new branch from master (you can do this withgit checkout master && git pull
) on your terminal withgit checkout -b issue-63/Finance-Major
.When you are sure you want to finalize your changes and push to GitHub:
git status
-- make sure you are on theissue-63/Finance-Major
branch (Git will tell you)git add data.sql
git commit -m "explanation of changes"
git push -u origin issue-63/Finance-Major
If you don't have Git installed, click here to see how.