Browse Source

Add migration versions (#3574)

Since Rails 5.1 missing migration version results in following error:

```
StandardError: Directly inheriting from ActiveRecord::Migration is not supported. Please specify the Rails release the migration was written for:
```

This PR fixes all migration files.
closed-social-v3
René Klačan 7 years ago
committed by Eugen Rochko
parent
commit
f54dca06a9
23 changed files with 23 additions and 23 deletions
  1. +1
    -1
      db/migrate/20160220174730_create_accounts.rb
  2. +1
    -1
      db/migrate/20160220211917_create_statuses.rb
  3. +1
    -1
      db/migrate/20160221003140_create_users.rb
  4. +1
    -1
      db/migrate/20160221003621_create_follows.rb
  5. +1
    -1
      db/migrate/20160222122600_create_stream_entries.rb
  6. +1
    -1
      db/migrate/20160222143943_add_profile_fields_to_accounts.rb
  7. +1
    -1
      db/migrate/20160223162837_add_metadata_to_statuses.rb
  8. +1
    -1
      db/migrate/20160223164502_make_uris_nullable_in_statuses.rb
  9. +1
    -1
      db/migrate/20160223165723_add_url_to_statuses.rb
  10. +1
    -1
      db/migrate/20160223165855_add_url_to_accounts.rb
  11. +1
    -1
      db/migrate/20160223171800_create_favourites.rb
  12. +1
    -1
      db/migrate/20160224223247_create_mentions.rb
  13. +1
    -1
      db/migrate/20160227230233_add_attachment_avatar_to_accounts.rb
  14. +1
    -1
      db/migrate/20160305115639_add_devise_to_users.rb
  15. +1
    -1
      db/migrate/20160306172223_create_doorkeeper_tables.rb
  16. +1
    -1
      db/migrate/20160312193225_add_attachment_header_to_accounts.rb
  17. +1
    -1
      db/migrate/20160314164231_add_owner_to_application.rb
  18. +1
    -1
      db/migrate/20160316103650_add_missing_indices.rb
  19. +1
    -1
      db/migrate/20160322193748_add_avatar_remote_url_to_accounts.rb
  20. +1
    -1
      db/migrate/20160325130944_add_admin_to_users.rb
  21. +1
    -1
      db/migrate/20161006213403_rails_settings_migration.rb
  22. +1
    -1
      db/migrate/20170112154826_migrate_settings.rb
  23. +1
    -1
      db/migrate/20170330164118_add_attachment_data_to_imports.rb

+ 1
- 1
db/migrate/20160220174730_create_accounts.rb View File

@ -1,4 +1,4 @@
class CreateAccounts < ActiveRecord::Migration
class CreateAccounts < ActiveRecord::Migration[4.2]
def change
create_table :accounts do |t|
t.string :username, null: false, default: ''

+ 1
- 1
db/migrate/20160220211917_create_statuses.rb View File

@ -1,4 +1,4 @@
class CreateStatuses < ActiveRecord::Migration
class CreateStatuses < ActiveRecord::Migration[4.2]
def change
create_table :statuses do |t|
t.string :uri, null: false, default: ''

+ 1
- 1
db/migrate/20160221003140_create_users.rb View File

@ -1,4 +1,4 @@
class CreateUsers < ActiveRecord::Migration
class CreateUsers < ActiveRecord::Migration[4.2]
def change
create_table :users do |t|
t.string :email, null: false, default: ''

+ 1
- 1
db/migrate/20160221003621_create_follows.rb View File

@ -1,4 +1,4 @@
class CreateFollows < ActiveRecord::Migration
class CreateFollows < ActiveRecord::Migration[4.2]
def change
create_table :follows do |t|
t.integer :account_id, null: false

+ 1
- 1
db/migrate/20160222122600_create_stream_entries.rb View File

@ -1,4 +1,4 @@
class CreateStreamEntries < ActiveRecord::Migration
class CreateStreamEntries < ActiveRecord::Migration[4.2]
def change
create_table :stream_entries do |t|
t.integer :account_id

+ 1
- 1
db/migrate/20160222143943_add_profile_fields_to_accounts.rb View File

@ -1,4 +1,4 @@
class AddProfileFieldsToAccounts < ActiveRecord::Migration
class AddProfileFieldsToAccounts < ActiveRecord::Migration[4.2]
def change
add_column :accounts, :note, :text, null: false, default: ''
add_column :accounts, :display_name, :string, null: false, default: ''

+ 1
- 1
db/migrate/20160223162837_add_metadata_to_statuses.rb View File

@ -1,4 +1,4 @@
class AddMetadataToStatuses < ActiveRecord::Migration
class AddMetadataToStatuses < ActiveRecord::Migration[4.2]
def change
add_column :statuses, :in_reply_to_id, :integer, null: true
add_column :statuses, :reblog_of_id, :integer, null: true

+ 1
- 1
db/migrate/20160223164502_make_uris_nullable_in_statuses.rb View File

@ -1,4 +1,4 @@
class MakeUrisNullableInStatuses < ActiveRecord::Migration
class MakeUrisNullableInStatuses < ActiveRecord::Migration[4.2]
def change
change_column :statuses, :uri, :string, null: true, default: nil
end

+ 1
- 1
db/migrate/20160223165723_add_url_to_statuses.rb View File

@ -1,4 +1,4 @@
class AddUrlToStatuses < ActiveRecord::Migration
class AddUrlToStatuses < ActiveRecord::Migration[4.2]
def change
add_column :statuses, :url, :string, null: true, default: nil
end

+ 1
- 1
db/migrate/20160223165855_add_url_to_accounts.rb View File

@ -1,4 +1,4 @@
class AddUrlToAccounts < ActiveRecord::Migration
class AddUrlToAccounts < ActiveRecord::Migration[4.2]
def change
add_column :accounts, :url, :string, null: true, default: nil
end

+ 1
- 1
db/migrate/20160223171800_create_favourites.rb View File

@ -1,4 +1,4 @@
class CreateFavourites < ActiveRecord::Migration
class CreateFavourites < ActiveRecord::Migration[4.2]
def change
create_table :favourites do |t|
t.integer :account_id, null: false

+ 1
- 1
db/migrate/20160224223247_create_mentions.rb View File

@ -1,4 +1,4 @@
class CreateMentions < ActiveRecord::Migration
class CreateMentions < ActiveRecord::Migration[4.2]
def change
create_table :mentions do |t|
t.integer :account_id

+ 1
- 1
db/migrate/20160227230233_add_attachment_avatar_to_accounts.rb View File

@ -1,4 +1,4 @@
class AddAttachmentAvatarToAccounts < ActiveRecord::Migration
class AddAttachmentAvatarToAccounts < ActiveRecord::Migration[4.2]
def self.up
change_table :accounts do |t|
t.attachment :avatar

+ 1
- 1
db/migrate/20160305115639_add_devise_to_users.rb View File

@ -1,4 +1,4 @@
class AddDeviseToUsers < ActiveRecord::Migration
class AddDeviseToUsers < ActiveRecord::Migration[4.2]
def self.up
change_table(:users) do |t|
## Database authenticatable

+ 1
- 1
db/migrate/20160306172223_create_doorkeeper_tables.rb View File

@ -1,4 +1,4 @@
class CreateDoorkeeperTables < ActiveRecord::Migration
class CreateDoorkeeperTables < ActiveRecord::Migration[4.2]
def change
create_table :oauth_applications do |t|
t.string :name, null: false

+ 1
- 1
db/migrate/20160312193225_add_attachment_header_to_accounts.rb View File

@ -1,4 +1,4 @@
class AddAttachmentHeaderToAccounts < ActiveRecord::Migration
class AddAttachmentHeaderToAccounts < ActiveRecord::Migration[4.2]
def self.up
change_table :accounts do |t|
t.attachment :header

+ 1
- 1
db/migrate/20160314164231_add_owner_to_application.rb View File

@ -1,4 +1,4 @@
class AddOwnerToApplication < ActiveRecord::Migration
class AddOwnerToApplication < ActiveRecord::Migration[4.2]
def change
add_column :oauth_applications, :owner_id, :integer, null: true
add_column :oauth_applications, :owner_type, :string, null: true

+ 1
- 1
db/migrate/20160316103650_add_missing_indices.rb View File

@ -1,4 +1,4 @@
class AddMissingIndices < ActiveRecord::Migration
class AddMissingIndices < ActiveRecord::Migration[4.2]
def change
add_index :users, :account_id
add_index :statuses, :account_id

+ 1
- 1
db/migrate/20160322193748_add_avatar_remote_url_to_accounts.rb View File

@ -1,4 +1,4 @@
class AddAvatarRemoteUrlToAccounts < ActiveRecord::Migration
class AddAvatarRemoteUrlToAccounts < ActiveRecord::Migration[4.2]
def change
add_column :accounts, :avatar_remote_url, :string, null: true, default: nil
end

+ 1
- 1
db/migrate/20160325130944_add_admin_to_users.rb View File

@ -1,4 +1,4 @@
class AddAdminToUsers < ActiveRecord::Migration
class AddAdminToUsers < ActiveRecord::Migration[4.2]
def change
add_column :users, :admin, :boolean, default: false
end

+ 1
- 1
db/migrate/20161006213403_rails_settings_migration.rb View File

@ -1,7 +1,7 @@
MIGRATION_BASE_CLASS = if ActiveRecord::VERSION::MAJOR >= 5
ActiveRecord::Migration[5.0]
else
ActiveRecord::Migration
ActiveRecord::Migration[4.2]
end
class RailsSettingsMigration < MIGRATION_BASE_CLASS

+ 1
- 1
db/migrate/20170112154826_migrate_settings.rb View File

@ -1,4 +1,4 @@
class MigrateSettings < ActiveRecord::Migration
class MigrateSettings < ActiveRecord::Migration[4.2]
def up
remove_index :settings, [:target_type, :target_id, :var]
rename_column :settings, :target_id, :thing_id

+ 1
- 1
db/migrate/20170330164118_add_attachment_data_to_imports.rb View File

@ -1,4 +1,4 @@
class AddAttachmentDataToImports < ActiveRecord::Migration
class AddAttachmentDataToImports < ActiveRecord::Migration[4.2]
def self.up
change_table :imports do |t|
t.attachment :data

Loading…
Cancel
Save