Skip to content
This repository has been archived by the owner on Jan 8, 2022. It is now read-only.

Commit

Permalink
Use versioned migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoyne committed Apr 1, 2019
1 parent a9ee142 commit 0003919
Show file tree
Hide file tree
Showing 15 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion db/migrate/20120502214248_devise_create_users.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class DeviseCreateUsers < ActiveRecord::Migration
class DeviseCreateUsers < ActiveRecord::Migration[4.2]
def change
create_table(:users) do |t|
## Database authenticatable
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20120502214252_create_searches.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- encoding : utf-8 -*-
class CreateSearches < ActiveRecord::Migration
class CreateSearches < ActiveRecord::Migration[4.2]
def self.up
create_table :searches do |t|
t.text :query_params
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20120502214253_create_bookmarks.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- encoding : utf-8 -*-
class CreateBookmarks < ActiveRecord::Migration
class CreateBookmarks < ActiveRecord::Migration[4.2]
def self.up
create_table :bookmarks do |t|
t.integer :user_id, null: false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- encoding : utf-8 -*-
class RemoveEditableFieldsFromBookmarks < ActiveRecord::Migration
class RemoveEditableFieldsFromBookmarks < ActiveRecord::Migration[4.2]
def self.up
remove_column :bookmarks, :notes
remove_column :bookmarks, :url
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- encoding : utf-8 -*-
class AddUserTypesToBookmarksSearches < ActiveRecord::Migration
class AddUserTypesToBookmarksSearches < ActiveRecord::Migration[4.2]
def self.up
add_column :searches, :user_type, :string
add_column :bookmarks, :user_type, :string
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20120502214405_create_superusers.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateSuperusers < ActiveRecord::Migration
class CreateSuperusers < ActiveRecord::Migration[4.2]
def self.up
create_table :superusers do |t|
t.integer :user_id, null: false
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20120523232755_create_hydrus_object_files.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateHydrusObjectFiles < ActiveRecord::Migration
class CreateHydrusObjectFiles < ActiveRecord::Migration[4.2]
def change
create_table(:object_files) do |t|
t.string :pid, null: false, default: ''
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20120524183252_add_label_to_file_object.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddLabelToFileObject < ActiveRecord::Migration
class AddLabelToFileObject < ActiveRecord::Migration[4.2]
def change
add_column :object_files, :label, :string, default: ''
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20120524235102_add_weight_to_object_file.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddWeightToObjectFile < ActiveRecord::Migration
class AddWeightToObjectFile < ActiveRecord::Migration[4.2]
def change
add_column :object_files, :weight, :integer, default: 0
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20130213202100_add_hide_to_object_file.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddHideToObjectFile < ActiveRecord::Migration
class AddHideToObjectFile < ActiveRecord::Migration[4.2]
def change
add_column(:object_files, :hide, :boolean, default: false)
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20130503213910_create_user_roles.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateUserRoles < ActiveRecord::Migration
class CreateUserRoles < ActiveRecord::Migration[4.2]
def change
create_table :user_roles do |t|
t.string :role, null: false, default: ''
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20130625185407_add_amy_hodge.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddAmyHodge < ActiveRecord::Migration
class AddAmyHodge < ActiveRecord::Migration[4.2]
def change
admins = UserRole.where(role: 'administrators').first
admins.users = 'bess,geisler,hfrost,jdeering,lmcrae,petucket,snydman,tcramer,tonyn,jvine,amyhodge'
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20130830222455_add_r_metz_to_admin.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddRMetzToAdmin < ActiveRecord::Migration
class AddRMetzToAdmin < ActiveRecord::Migration[4.2]
def change
admins = UserRole.where(role: 'administrators').first
admins.users = 'bess,geisler,hfrost,jdeering,lmcrae,petucket,snydman,tcramer,tonyn,jvine,amyhodge,rmetz'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class ConvertUserRolesColumnToText < ActiveRecord::Migration
class ConvertUserRolesColumnToText < ActiveRecord::Migration[4.2]
def up
change_column :user_roles, :users, :text
end
Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

# Checks for pending migration and applies them before tests are run.
# If you are not using ActiveRecord, you can remove this line.
ActiveRecord::Migration.maintain_test_schema!
ActiveRecord::Migration[4.2].maintain_test_schema!

Warden.test_mode!

Expand Down

0 comments on commit 0003919

Please sign in to comment.