Fix the migration class name
Due to Active Support auto loading feature, the migration class shouldn't be name-spaced under the `ActiveStorage` constant, otherwise, running the migrations would throw an error.
This commit is contained in:
parent
a2e864fa13
commit
fb88ff78b3
@ -1,4 +1,4 @@
|
||||
class ActiveStorage::CreateTables < ActiveRecord::Migration[5.1]
|
||||
class ActiveStorageCreateTables < ActiveRecord::Migration[5.1]
|
||||
def change
|
||||
create_table :active_storage_blobs do |t|
|
||||
t.string :key
|
||||
|
@ -1,4 +1,4 @@
|
||||
class ActiveStorage::CreateUsers < ActiveRecord::Migration[5.1]
|
||||
class ActiveStorageCreateUsers < ActiveRecord::Migration[5.1]
|
||||
def change
|
||||
create_table :users do |t|
|
||||
t.string :name
|
||||
|
@ -2,5 +2,5 @@
|
||||
require_relative "create_users_migration"
|
||||
|
||||
ActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: ':memory:')
|
||||
ActiveStorage::CreateTables.migrate(:up)
|
||||
ActiveStorage::CreateUsers.migrate(:up)
|
||||
ActiveStorageCreateTables.migrate(:up)
|
||||
ActiveStorageCreateUsers.migrate(:up)
|
||||
|
Loading…
Reference in New Issue
Block a user