class

Marten::DB::Management::ProjectState

Inherits Reference / Object

Represents the state of the whole DB schema of the project at a specific step in a migration plan.

Constructors

new(tables = [] of TableState)
Source

Class methods

from_apps(apps : Array(Apps::Config))

Initialize a project state from all the current tables of the project applications.

Source

Instance methods

add_table(table : TableState) : Nil

Adds a table state to the current project state.

Source
clone

Returns a clone of the current project state.

Source
delete_table(app_label : String, name : String) : Nil

Deletes a table state from the current project state.

Source
get_table(app_label : String, name : String) : TableState

Returns the table state corresponding to the passed app label and table name.

Source
get_table(id : String) : TableState

Returns the table state corresponding to the passed table ID.

Source
rename_table(app_label : String, old_name : String, new_name : String) : Nil

Renames a specific a table state.

Source
tables
Source