-
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.
Merge pull request #1 from thekeenant/remove-trends
Remove trends/changes tables
- Loading branch information
Showing
14 changed files
with
14 additions
and
347 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
This file was deleted.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,54 +1,21 @@ | ||
# MySQL. Versions 5.1.10 and up are supported. | ||
# | ||
# Install the MySQL driver | ||
# gem install mysql2 | ||
# | ||
# Ensure the MySQL gem is defined in your Gemfile | ||
# gem 'mysql2' | ||
# | ||
# And be sure to use new-style password hashing: | ||
# http://dev.mysql.com/doc/refman/5.7/en/old-client.html | ||
# | ||
default: &default | ||
adapter: mysql2 | ||
encoding: utf8 | ||
pool: 10 | ||
username: root | ||
password: password | ||
socket: /var/run/mysqld/mysqld.sock | ||
username: remote | ||
password: 067dcea2cf57 | ||
host: server.madgrades.com | ||
port: 3306 | ||
# socket: /var/run/mysqld/mysqld.sock | ||
|
||
development: | ||
<<: *default | ||
database: madgrades_dev | ||
database: madgrades | ||
|
||
# Warning: The database defined as "test" will be erased and | ||
# re-generated from your development database when you run "rake". | ||
# Do not set this db to the same as development or production. | ||
test: | ||
<<: *default | ||
database: madgrades_test | ||
|
||
# As with config/secrets.yml, you never want to store sensitive information, | ||
# like your database password, in your source code. If your source code is | ||
# ever seen by anyone, they now have access to your database. | ||
# | ||
# Instead, provide the password as a unix environment variable when you boot | ||
# the app. Read http://guides.rubyonrails.org/configuring.html#configuring-a-database | ||
# for a full rundown on how to provide these environment variables in a | ||
# production deployment. | ||
# | ||
# On Heroku and other platform providers, you may have a full connection URL | ||
# available as an environment variable. For example: | ||
# | ||
# DATABASE_URL="mysql2://myuser:mypass@localhost/somedatabase" | ||
# | ||
# You can use this database configuration with: | ||
# | ||
# production: | ||
# url: <%= ENV['DATABASE_URL'] %> | ||
# | ||
production: | ||
<<: *default | ||
database: madgrades | ||
username: root | ||
password: password |
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
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,15 +1,7 @@ | ||
scheduler = Rufus::Scheduler::singleton | ||
|
||
def populate_course_grades | ||
course_offering_count = GradeDistribution.select(:course_uuid).group(:course_uuid).count | ||
|
||
if course_offering_count != CourseOfferingGradeDist.count | ||
CourseOfferingGradeDist.populate! | ||
end | ||
end | ||
|
||
unless defined?(Rails::Console) || File.split($0).last == 'rake' | ||
scheduler.every '7d' do | ||
populate_course_grades | ||
# ... | ||
end | ||
end |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class DropTableCourseChange < ActiveRecord::Migration[5.1] | ||
def change | ||
drop_table :course_changes | ||
end | ||
end |
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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.