module

Marten::DB::Management::SchemaEditor

Constants

IMPLEMENTATIONS = {Connection::MYSQL_ID => SchemaEditor::MySQL, Connection::POSTGRESQL_ID => SchemaEditor::PostgreSQL, Connection::SQLITE_ID => SchemaEditor::SQLite}

Class methods

for(connection : Connection::Base) : SchemaEditor::Base

Returns a schema editor for the passed connection.

Source
run_for(connection : Connection::Base, atomic = true, &)

Returns a schema editor instance whose SQL operations can be enclosed in a single transaction.

By default all operations performed with the yielded schema editor object will be done inside a single transaction, unless atomic is set to false. Note that some database backends (such as MySQL) may not support transactions for DDL statements ; in those case the use of atomic will be ignored.

Source

Nested types