migration
Types
pub type FieldDifference {
FieldAdded(MigrationEntity)
FieldRemoved(MigrationEntity)
FieldChanged(MigrationEntity, MigrationEntity)
TableAdded(String)
}
Constructors
-
FieldAdded(MigrationEntity) -
FieldRemoved(MigrationEntity) -
FieldChanged(MigrationEntity, MigrationEntity) -
TableAdded(String)
pub type MigrationEntity {
MigrationTableField(
name: String,
table: String,
type_: surreal_type.SurrealType,
raw_string: String,
)
MigrationAccess(name: String, raw_string: String)
}
Constructors
-
MigrationTableField( name: String, table: String, type_: surreal_type.SurrealType, raw_string: String, ) -
MigrationAccess(name: String, raw_string: String)
pub type MigrationTable {
MigrationTable(
name: String,
fields: List(MigrationEntity),
type_: node.TableType,
)
}
Constructors
-
MigrationTable( name: String, fields: List(MigrationEntity), type_: node.TableType, )
Values
pub fn extract_entities(
extracted_info: extractor.ExtractorResult,
) -> List(MigrationEntity)
pub fn find_different_entities(
current: List(MigrationEntity),
previous: List(MigrationEntity),
extracted_info: extractor.ExtractorResult,
) -> List(FieldDifference)
pub fn generate_migrations(
version: Int,
fields: List(FieldDifference),
) -> module.Module
pub fn migration_table_field_decoder() -> decode.Decoder(
MigrationEntity,
)
pub fn migration_table_field_to_json(
field: MigrationEntity,
) -> json.Json
pub fn surreal_type_decoder() -> decode.Decoder(
surreal_type.SurrealType,
)