Class: ActualDbSchema::MigrationsController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
app/controllers/actual_db_schema/migrations_controller.rb

Overview

Controller to display the list of migrations for each database connection.

Instance Method Summary collapse

Instance Method Details

#indexObject



9
# File 'app/controllers/actual_db_schema/migrations_controller.rb', line 9

def index; end

#migrateObject



20
21
22
23
# File 'app/controllers/actual_db_schema/migrations_controller.rb', line 20

def migrate
  handle_migrate(params[:id], params[:database])
  redirect_to migrations_path
end

#rollbackObject



15
16
17
18
# File 'app/controllers/actual_db_schema/migrations_controller.rb', line 15

def rollback
  handle_rollback(params[:id], params[:database])
  redirect_to migrations_path
end

#showObject



11
12
13
# File 'app/controllers/actual_db_schema/migrations_controller.rb', line 11

def show
  render file: "#{Rails.root}/public/404.html", layout: false, status: :not_found unless migration
end