Skip to content

Commit

Permalink
Remove foreign key annotations
Browse files Browse the repository at this point in the history
Summary:
Changed the annotate config so that the foregin key annotation are no
longer there.  Also removed foreign keys from existing files.

Test Plan:
Run
```
rake db:migrate
```
and make sure there are no foreign key annotations in the models.

Reviewers: jonchuchu, isaiahyoon, qin, quinton

Reviewed By: quinton

Subscribers: qin, quinton, isaiahyoon, jonchuchu

Projects: #crt

Differential Revision: http://phab.calblueprint.org/D329
  • Loading branch information
chenhoward committed Mar 6, 2016
1 parent e6b88dc commit 074f977
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 21 deletions.
4 changes: 0 additions & 4 deletions app/controllers/data_values_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@
#
# index_data_values_on_data_type_id (data_type_id)
#
# Foreign Keys
#
# fk_rails_d15d3bc9d0 (data_type_id => data_types.id)
#

class DataValuesController < ApplicationController
def destroy
Expand Down
4 changes: 0 additions & 4 deletions app/controllers/project_years_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@
#
# index_project_years_on_project_id (project_id)
#
# Foreign Keys
#
# fk_rails_0e1b2ff6d4 (project_id => projects.id)
#

class ProjectYearsController < ApplicationController
def index
Expand Down
4 changes: 0 additions & 4 deletions app/models/data_value.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@
#
# index_data_values_on_data_type_id (data_type_id)
#
# Foreign Keys
#
# fk_rails_d15d3bc9d0 (data_type_id => data_types.id)
#

class DataValue < ActiveRecord::Base
scope :sort_by_year, -> { joins(:project_year).order('project_years.date') }
Expand Down
4 changes: 0 additions & 4 deletions app/models/project_year.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@
#
# index_project_years_on_project_id (project_id)
#
# Foreign Keys
#
# fk_rails_0e1b2ff6d4 (project_id => projects.id)
#

class ProjectYear < ActiveRecord::Base
scope :specific, -> { where.not(project: Project.master_project) }
Expand Down
4 changes: 0 additions & 4 deletions app/serializers/project_year_serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@
#
# index_project_years_on_project_id (project_id)
#
# Foreign Keys
#
# fk_rails_0e1b2ff6d4 (project_id => projects.id)
#

class ProjectYearSerializer < ActiveModel::Serializer
attributes :project_id, :year_id, :date, :sorted_data_values
Expand Down
2 changes: 1 addition & 1 deletion lib/tasks/auto_annotate_models.rake
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if Rails.env.development?
'position_in_fixture' => "before",
'position_in_factory' => "before",
'position_in_serializer' => "before",
'show_foreign_keys' => "true",
'show_foreign_keys' => "false",
'show_indexes' => "true",
'simple_indexes' => "false",
'model_dir' => "app/models",
Expand Down

0 comments on commit 074f977

Please sign in to comment.