Module: BetterAuth::Roda::Migration
- Defined in:
- lib/better_auth/roda/migration.rb
Constant Summary
collapse
- DEFAULT_MIGRATIONS_PATH =
BetterAuth::SQLMigration::DEFAULT_MIGRATIONS_PATH
- MISSING_MIGRATIONS_TABLE_MESSAGES =
BetterAuth::SQLMigration::MISSING_MIGRATIONS_TABLE_MESSAGES
- UnsupportedAdapterError =
BetterAuth::SQLMigration::UnsupportedAdapterError
- GENERATOR =
"better_auth-roda"
Class Method Summary
collapse
-
.generate(options, dialect:, migrations_path: DEFAULT_MIGRATIONS_PATH, timestamp: Time.now.utc.strftime("%Y%m%d%H%M%S"), connection: nil) ⇒ Object
-
.method_missing(name, *args, **kwargs, &block) ⇒ Object
-
.migrate(auth_or_options, migrations_path: DEFAULT_MIGRATIONS_PATH) ⇒ Object
-
.render(options, dialect:) ⇒ Object
-
.respond_to_missing?(name, include_private = false) ⇒ Boolean
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, **kwargs, &block) ⇒ Object
34
35
36
37
38
|
# File 'lib/better_auth/roda/migration.rb', line 34
def method_missing(name, *args, **kwargs, &block)
return BetterAuth::SQLMigration.public_send(name, *args, **kwargs, &block) if BetterAuth::SQLMigration.respond_to?(name)
super
end
|
Class Method Details
.generate(options, dialect:, migrations_path: DEFAULT_MIGRATIONS_PATH, timestamp: Time.now.utc.strftime("%Y%m%d%H%M%S"), connection: nil) ⇒ Object
19
20
21
22
23
24
25
26
27
28
|
# File 'lib/better_auth/roda/migration.rb', line 19
def generate(options, dialect:, migrations_path: DEFAULT_MIGRATIONS_PATH, timestamp: Time.now.utc.strftime("%Y%m%d%H%M%S"), connection: nil)
BetterAuth::SQLMigration.generate(
options,
dialect: dialect,
generator: GENERATOR,
migrations_path: migrations_path,
timestamp: timestamp,
connection: connection
)
end
|
.method_missing(name, *args, **kwargs, &block) ⇒ Object
34
35
36
37
38
|
# File 'lib/better_auth/roda/migration.rb', line 34
def method_missing(name, *args, **kwargs, &block)
return BetterAuth::SQLMigration.public_send(name, *args, **kwargs, &block) if BetterAuth::SQLMigration.respond_to?(name)
super
end
|
.migrate(auth_or_options, migrations_path: DEFAULT_MIGRATIONS_PATH) ⇒ Object
30
31
32
|
# File 'lib/better_auth/roda/migration.rb', line 30
def migrate(auth_or_options, migrations_path: DEFAULT_MIGRATIONS_PATH)
BetterAuth::SQLMigration.migrate(auth_or_options, migrations_path: migrations_path)
end
|
.render(options, dialect:) ⇒ Object
15
16
17
|
# File 'lib/better_auth/roda/migration.rb', line 15
def render(options, dialect:)
BetterAuth::SQLMigration.render(options, dialect: dialect, generator: GENERATOR)
end
|
.respond_to_missing?(name, include_private = false) ⇒ Boolean
40
41
42
|
# File 'lib/better_auth/roda/migration.rb', line 40
def respond_to_missing?(name, include_private = false)
BetterAuth::SQLMigration.respond_to?(name, include_private) || super
end
|