Skip to content

Commit

Permalink
[ajey] added ActiveRecord:Migration version to 5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ajeygore committed Dec 7, 2018
1 parent dde26c1 commit 0aeb52d
Show file tree
Hide file tree
Showing 60 changed files with 266 additions and 248 deletions.
2 changes: 1 addition & 1 deletion db/migrate/20160419122430_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[5.0]
def change
create_table :users do |t|
## Database authenticatable
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20160419132647_add_provider_to_users.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddProviderToUsers < ActiveRecord::Migration
class AddProviderToUsers < ActiveRecord::Migration[5.0]
def change
add_column :users, :provider, :string
add_column :users, :uid, :string
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20160419144739_add_name_to_users.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddNameToUsers < ActiveRecord::Migration
class AddNameToUsers < ActiveRecord::Migration[5.0]
def change
add_column :users, :name, :string
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20160427123146_add_auth_key_to_user.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddAuthKeyToUser < ActiveRecord::Migration
class AddAuthKeyToUser < ActiveRecord::Migration[5.0]
def change
add_column :users, :auth_key, :string
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20160427123233_add_provisioning_uri_to_user.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddProvisioningUriToUser < ActiveRecord::Migration
class AddProvisioningUriToUser < ActiveRecord::Migration[5.0]
def change
add_column :users, :provisioning_uri, :string
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20160519042340_add_active_to_users.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddActiveToUsers < ActiveRecord::Migration
class AddActiveToUsers < ActiveRecord::Migration[5.0]
def change
add_column :users, :active, :boolean
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20160519064340_add_default_value_to_users.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddDefaultValueToUsers < ActiveRecord::Migration
class AddDefaultValueToUsers < ActiveRecord::Migration[5.0]
def change
change_column :users, :active, :boolean, default: true
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20160615044834_create_hosts.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateHosts < ActiveRecord::Migration
class CreateHosts < ActiveRecord::Migration[5.0]
def change
create_table :hosts do |t|
t.string :host_pattern
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20160615045052_add_admin_to_user.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddAdminToUser < ActiveRecord::Migration
class AddAdminToUser < ActiveRecord::Migration[5.0]
def change
add_column :users, :admin, :boolean, default: false
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20160615112805_add_user_to_host.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddUserToHost < ActiveRecord::Migration
class AddUserToHost < ActiveRecord::Migration[5.0]
def change
add_reference :hosts, :user, index: true, foreign_key: true
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20160628140022_add_deleted_at_to_host.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddDeletedAtToHost < ActiveRecord::Migration
class AddDeletedAtToHost < ActiveRecord::Migration[5.0]
def change
add_column :hosts, :deleted_at, :datetime
add_index :hosts, :deleted_at
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20160628140440_add_deleted_by_to_host.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddDeletedByToHost < ActiveRecord::Migration
class AddDeletedByToHost < ActiveRecord::Migration[5.0]
def change
add_column :hosts, :deleted_by, :integer
add_index :hosts, :deleted_by
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20160629043358_add_homedir_to_user.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddHomedirToUser < ActiveRecord::Migration
class AddHomedirToUser < ActiveRecord::Migration[5.0]
def change
add_column :users, :home_dir, :string
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20160629043415_add_shell_to_user.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddShellToUser < ActiveRecord::Migration
class AddShellToUser < ActiveRecord::Migration[5.0]
def change
add_column :users, :shell, :string
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20160629075435_create_groups.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateGroups < ActiveRecord::Migration
class CreateGroups < ActiveRecord::Migration[5.0]
def change
create_table :groups do |t|
t.string :name
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20160701090045_create_group_associations.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateGroupAssociations < ActiveRecord::Migration
class CreateGroupAssociations < ActiveRecord::Migration[5.0]
def change
create_table :group_associations do |t|
t.references :user
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddDeletedPropertiesToGroup < ActiveRecord::Migration
class AddDeletedPropertiesToGroup < ActiveRecord::Migration[5.0]
def change
add_column :groups, :deleted_by, :integer
add_column :groups, :deleted_at, :datetime
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20160707115313_create_access_tokens.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateAccessTokens < ActiveRecord::Migration
class CreateAccessTokens < ActiveRecord::Migration[5.0]
def change
create_table :access_tokens do |t|
t.string :token
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20160714115228_add_public_key_to_user.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddPublicKeyToUser < ActiveRecord::Migration
class AddPublicKeyToUser < ActiveRecord::Migration[5.0]
def change
add_column :users, :public_key, :text
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20160908081651_create_host_machines.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateHostMachines < ActiveRecord::Migration
class CreateHostMachines < ActiveRecord::Migration[5.0]
def change
create_table :host_machines do |t|
t.string :name
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20161003145832_create_host_access_groups.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateHostAccessGroups < ActiveRecord::Migration
class CreateHostAccessGroups < ActiveRecord::Migration[5.0]
def change
create_table :host_access_groups do |t|
t.references :host_machine
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20170803140620_add_user_login_id_to_user.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddUserLoginIdToUser < ActiveRecord::Migration
class AddUserLoginIdToUser < ActiveRecord::Migration[5.0]
def change
add_column :users, :user_login_id, :string
add_index :users, :user_login_id
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20171013115441_create_versions.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This migration creates the `versions` table, the only schema PT requires.
# All other migrations PT provides are optional.
class CreateVersions < ActiveRecord::Migration
class CreateVersions < ActiveRecord::Migration[5.0]

# The largest text column available in all supported RDBMS is
# 1024^3 - 1 bytes, roughly one gibibyte. We specify a size
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20171016064705_remove_index_group_name.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class RemoveIndexGroupName < ActiveRecord::Migration
class RemoveIndexGroupName < ActiveRecord::Migration[5.0]
def change
remove_index :groups, [:name]
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddUniqueIndexOnGroupsName < ActiveRecord::Migration
class AddUniqueIndexOnGroupsName < ActiveRecord::Migration[5.0]
def change
add_index :groups, :name, unique: true
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20171031060034_create_group_admin.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateGroupAdmin < ActiveRecord::Migration
class CreateGroupAdmin < ActiveRecord::Migration[5.0]
def change
create_table :group_admins do |t|
t.integer :group_id
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddForeignKeyRefOnGroupAdmin < ActiveRecord::Migration
class AddForeignKeyRefOnGroupAdmin < ActiveRecord::Migration[5.0]
def change
add_foreign_key :group_admins, :groups
add_foreign_key :group_admins, :users
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20171031100758_create_vpns.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateVpns < ActiveRecord::Migration
class CreateVpns < ActiveRecord::Migration[5.0]
def change
create_table :vpns do |t|
t.string :name
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20171031101026_create_vpn_group_association.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateVpnGroupAssociation < ActiveRecord::Migration
class CreateVpnGroupAssociation < ActiveRecord::Migration[5.0]
def change
create_table :vpn_group_associations do |t|
t.integer :group_id
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddForeignKeyRefOnVpnGroupAssociation < ActiveRecord::Migration
class AddForeignKeyRefOnVpnGroupAssociation < ActiveRecord::Migration[5.0]
def change
add_foreign_key :vpn_group_associations, :groups
add_foreign_key :vpn_group_associations, :vpns
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateVpnGroupUserAssociation < ActiveRecord::Migration
class CreateVpnGroupUserAssociation < ActiveRecord::Migration[5.0]
def change
create_table :vpn_group_user_associations do |t|
t.integer :user_id
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddForeignKeyRefOnVpnGroupUserAssociation < ActiveRecord::Migration
class AddForeignKeyRefOnVpnGroupUserAssociation < ActiveRecord::Migration[5.0]
def change
add_foreign_key :vpn_group_user_associations, :users
add_foreign_key :vpn_group_user_associations, :groups
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20171102071909_add_ip_address_to_vpns.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddIpAddressToVpns < ActiveRecord::Migration
class AddIpAddressToVpns < ActiveRecord::Migration[5.0]
def change
add_column :vpns, :ip_address, :string
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20171107114249_remove_url_from_vpns.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class RemoveUrlFromVpns < ActiveRecord::Migration
class RemoveUrlFromVpns < ActiveRecord::Migration[5.0]
def change
remove_column :vpns, :url, :string
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20171108130234_add_user_id_to_access_token.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddUserIdToAccessToken < ActiveRecord::Migration
class AddUserIdToAccessToken < ActiveRecord::Migration[5.0]
def change
add_column :access_tokens, :user_id, :integer
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddForeignKeyRefOnAccessTokens < ActiveRecord::Migration
class AddForeignKeyRefOnAccessTokens < ActiveRecord::Migration[5.0]
def change
add_foreign_key "access_tokens", "users"
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20171124090240_add_uuid_to_vpns.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddUuidToVpns < ActiveRecord::Migration
class AddUuidToVpns < ActiveRecord::Migration[5.0]
def change
add_column :vpns, :uuid, :string
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateVpnDomainNameServers < ActiveRecord::Migration
class CreateVpnDomainNameServers < ActiveRecord::Migration[5.0]
def change
create_table :vpn_domain_name_servers do |t|
t.integer :vpn_id
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20171124114830_create_vpn_search_domains.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateVpnSearchDomains < ActiveRecord::Migration
class CreateVpnSearchDomains < ActiveRecord::Migration[5.0]
def change
create_table :vpn_search_domains do |t|
t.integer :vpn_id
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateVpnSupplementalMatchDomains < ActiveRecord::Migration
class CreateVpnSupplementalMatchDomains < ActiveRecord::Migration[5.0]
def change
create_table :vpn_supplemental_match_domains do |t|
t.integer :vpn_id
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20180104081814_add_product_name_to_users.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddProductNameToUsers < ActiveRecord::Migration
class AddProductNameToUsers < ActiveRecord::Migration[5.0]
def change
add_column :users, :product_name, :string
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20180202102206_create_saml_service_providers.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateSamlServiceProviders < ActiveRecord::Migration
class CreateSamlServiceProviders < ActiveRecord::Migration[5.0]
def change
create_table :saml_service_providers do |t|
t.string :name, null: false, unique: true
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20180214050204_add_api_key_to_host_machines.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddApiKeyToHostMachines < ActiveRecord::Migration
class AddApiKeyToHostMachines < ActiveRecord::Migration[5.0]
def change
add_column :host_machines, :api_key, :string
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20180214052451_create_ip_addresses.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateIpAddresses < ActiveRecord::Migration
class CreateIpAddresses < ActiveRecord::Migration[5.0]
def change
create_table :ip_addresses do |t|
t.string :address
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddHostMachineToIpAddress < ActiveRecord::Migration
class AddHostMachineToIpAddress < ActiveRecord::Migration[5.0]
def change
add_reference :ip_addresses, :host_machine, index: true, foreign_key: true
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20180219150818_add_description_to_group.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddDescriptionToGroup < ActiveRecord::Migration
class AddDescriptionToGroup < ActiveRecord::Migration[5.0]
def change
add_column :groups, :description, :string
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddAccessKeyToHostMachine < ActiveRecord::Migration
class AddAccessKeyToHostMachine < ActiveRecord::Migration[5.0]
def change
add_column :host_machines, :access_key, :string
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20180222140000_add_access_key_to_user.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddAccessKeyToUser < ActiveRecord::Migration
class AddAccessKeyToUser < ActiveRecord::Migration[5.0]
def change
add_column :users, :access_key, :string
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20180227051732_create_api_resources.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateApiResources < ActiveRecord::Migration
class CreateApiResources < ActiveRecord::Migration[5.0]
def change
create_table :api_resources do |t|
t.string :name
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20180301010021_add_user_to_api_resources.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddUserToApiResources < ActiveRecord::Migration
class AddUserToApiResources < ActiveRecord::Migration[5.0]
def change
add_reference :api_resources, :user, index: true, foreign_key: true
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20180301010035_add_group_to_api_resources.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddGroupToApiResources < ActiveRecord::Migration
class AddGroupToApiResources < ActiveRecord::Migration[5.0]
def change
add_reference :api_resources, :group, index: true, foreign_key: true
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20180306231200_add_deactivated_at_to_users.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddDeactivatedAtToUsers < ActiveRecord::Migration
class AddDeactivatedAtToUsers < ActiveRecord::Migration[5.0]
def change
add_column :users, :deactivated_at, :datetime
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class RenameAccessKeyInApiResources < ActiveRecord::Migration
class RenameAccessKeyInApiResources < ActiveRecord::Migration[5.0]
def change
rename_column :api_resources, :access_key, :hashed_access_key
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20180311161200_rename_token_in_access_tokens.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class RenameTokenInAccessTokens < ActiveRecord::Migration
class RenameTokenInAccessTokens < ActiveRecord::Migration[5.0]
def change
rename_column :access_tokens, :token, :hashed_token
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateIndexesToSpeedupNssController < ActiveRecord::Migration
class CreateIndexesToSpeedupNssController < ActiveRecord::Migration[5.0]
def change
add_index :users, :uid
add_index :access_tokens, :hashed_token
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20180613074108_create_organisations.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateOrganisations < ActiveRecord::Migration
class CreateOrganisations < ActiveRecord::Migration[5.0]
def change
create_table :organisations do |t|
t.string :name
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20180613165050_drop_saml_service_providers.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class DropSamlServiceProviders < ActiveRecord::Migration
class DropSamlServiceProviders < ActiveRecord::Migration[5.0]
def change
drop_table :saml_service_providers
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20180723175600_update_organisations_for_saml.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class UpdateOrganisationsForSaml < ActiveRecord::Migration
class UpdateOrganisationsForSaml < ActiveRecord::Migration[5.0]
def change
rename_column :organisations, :url, :website
rename_column :organisations, :email_domain, :domain
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddDefaultAdminsToHostMachines < ActiveRecord::Migration
class AddDefaultAdminsToHostMachines < ActiveRecord::Migration[5.0]
def change
add_column :host_machines, :default_admins, :boolean, default: true
end
Expand Down
Loading

0 comments on commit 0aeb52d

Please sign in to comment.