Skip to content

Commit

Permalink
Merge pull request #152 from tamu-edu-students/migrate-test
Browse files Browse the repository at this point in the history
Migrate test
  • Loading branch information
Matthew-Atanas committed Jul 15, 2024
2 parents 3c92d87 + e239cf7 commit f1dfe86
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/code-climate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
run: |
rails db:drop
rails db:create
rails db:schema:load
rails db:migrate
env:
RAILS_ENV: test
working-directory: ./cybercrm
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rubyonrails.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
run: |
rails db:drop
rails db:create
rails db:schema:load
rails db:migrate
working-directory: ./cybercrm
- name: Run cucumber
run: bundle exec cucumber
Expand Down
3 changes: 2 additions & 1 deletion cybercrm/db/migrate/20240624020955_create_students.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def change
t.string :name
t.integer :age
t.string :grade
t.string :uin, unique: true
t.string :uin
t.decimal :gpa
t.string :gender
t.string :ethnicity
Expand All @@ -18,6 +18,7 @@ def change

t.timestamps
end
add_index :students, :uin, unique: true
end
# rubocop:enable Metrics/MethodLength
end

This file was deleted.

3 changes: 2 additions & 1 deletion cybercrm/db/migrate/20240627225142_add_email_to_students.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# Add email to students
class AddEmailToStudents < ActiveRecord::Migration[7.1]
def change
add_column :students, :email, :string, unique: true
add_column :students, :email, :string
add_index :students, :email, unique: true
end
end
2 changes: 0 additions & 2 deletions cybercrm/db/migrate/20240714075108_add_unique_indexes.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
class AddUniqueIndexes < ActiveRecord::Migration[7.1]
def change
add_index :custom_attributes, :name, unique: true
add_index :students, :uin, unique: true
add_index :students, :email, unique: true
add_index :users, :email, unique: true
end
end

0 comments on commit f1dfe86

Please sign in to comment.