Interface IMigrationGenerator
Base interface for a migration SQL generator
Namespace: FluentMigrator
Assembly: FluentMigrator.Abstractions.dll
Syntax
public interface IMigrationGenerator
Methods
| Edit this page View SourceGenerate(AlterColumnExpression)
Generates a ALTER TABLE ALTER COLUMN
SQL statement
Declaration
string Generate(AlterColumnExpression expression)
Parameters
Type | Name | Description |
---|---|---|
AlterColumnExpression | expression | The expression to create the SQL for |
Returns
Type | Description |
---|---|
string | The generated SQL |
Generate(AlterDefaultConstraintExpression)
Generates an SQL statement to alter a DEFAULT constraint
Declaration
string Generate(AlterDefaultConstraintExpression expression)
Parameters
Type | Name | Description |
---|---|---|
AlterDefaultConstraintExpression | expression | The expression to create the SQL for |
Returns
Type | Description |
---|---|
string | The generated SQL |
Generate(AlterSchemaExpression)
Generates an SQL statement to move a table from one schema to another
Declaration
string Generate(AlterSchemaExpression expression)
Parameters
Type | Name | Description |
---|---|---|
AlterSchemaExpression | expression | The expression to create the SQL for |
Returns
Type | Description |
---|---|
string | The generated SQL |
Generate(AlterTableExpression)
Generates a ALTER TABLE
SQL statement
Declaration
string Generate(AlterTableExpression expression)
Parameters
Type | Name | Description |
---|---|---|
AlterTableExpression | expression | The expression to create the SQL for |
Returns
Type | Description |
---|---|
string | The generated SQL |
Generate(CreateColumnExpression)
Generates a ALTER TABLE ADD COLUMN
SQL statement
Declaration
string Generate(CreateColumnExpression expression)
Parameters
Type | Name | Description |
---|---|---|
CreateColumnExpression | expression | The expression to create the SQL for |
Returns
Type | Description |
---|---|
string | The generated SQL |
Generate(CreateConstraintExpression)
Generates an SQL statement to create a constraint
Declaration
string Generate(CreateConstraintExpression expression)
Parameters
Type | Name | Description |
---|---|---|
CreateConstraintExpression | expression | The expression to create the SQL for |
Returns
Type | Description |
---|---|
string | The generated SQL |
Generate(CreateForeignKeyExpression)
Generates an SQL statement to create a foreign key
Declaration
string Generate(CreateForeignKeyExpression expression)
Parameters
Type | Name | Description |
---|---|---|
CreateForeignKeyExpression | expression | The expression to create the SQL for |
Returns
Type | Description |
---|---|
string | The generated SQL |
Generate(CreateIndexExpression)
Generates an SQL statement to create an index
Declaration
string Generate(CreateIndexExpression expression)
Parameters
Type | Name | Description |
---|---|---|
CreateIndexExpression | expression | The expression to create the SQL for |
Returns
Type | Description |
---|---|
string | The generated SQL |
Generate(CreateSchemaExpression)
Generates a CREATE SCHEMA
SQL statement
Declaration
string Generate(CreateSchemaExpression expression)
Parameters
Type | Name | Description |
---|---|---|
CreateSchemaExpression | expression | The expression to create the SQL for |
Returns
Type | Description |
---|---|
string | The generated SQL |
Generate(CreateSequenceExpression)
Generates a CREATE SEQUENCE
SQL statement
Declaration
string Generate(CreateSequenceExpression expression)
Parameters
Type | Name | Description |
---|---|---|
CreateSequenceExpression | expression | The expression to create the SQL for |
Returns
Type | Description |
---|---|
string | The generated SQL |
Generate(CreateTableExpression)
Generates a CREATE TABLE
SQL statement
Declaration
string Generate(CreateTableExpression expression)
Parameters
Type | Name | Description |
---|---|---|
CreateTableExpression | expression | The expression to create the SQL for |
Returns
Type | Description |
---|---|
string | The generated SQL |
Generate(DeleteColumnExpression)
Generates a ALTER TABLE DROP COLUMN
SQL statement
Declaration
string Generate(DeleteColumnExpression expression)
Parameters
Type | Name | Description |
---|---|---|
DeleteColumnExpression | expression | The expression to create the SQL for |
Returns
Type | Description |
---|---|
string | The generated SQL |
Generate(DeleteConstraintExpression)
Generates an SQL statement to drop a constraint
Declaration
string Generate(DeleteConstraintExpression expression)
Parameters
Type | Name | Description |
---|---|---|
DeleteConstraintExpression | expression | The expression to create the SQL for |
Returns
Type | Description |
---|---|
string | The generated SQL |
Generate(DeleteDataExpression)
Generates an SQL statement to DELETE data
Declaration
string Generate(DeleteDataExpression expression)
Parameters
Type | Name | Description |
---|---|---|
DeleteDataExpression | expression | The expression to create the SQL for |
Returns
Type | Description |
---|---|
string | The generated SQL |
Generate(DeleteDefaultConstraintExpression)
Generates an SQL statement to drop a default constraint
Declaration
string Generate(DeleteDefaultConstraintExpression expression)
Parameters
Type | Name | Description |
---|---|---|
DeleteDefaultConstraintExpression | expression | The expression to create the SQL for |
Returns
Type | Description |
---|---|
string | The generated SQL |
Generate(DeleteForeignKeyExpression)
Generates an SQL statement to delete a foreign key
Declaration
string Generate(DeleteForeignKeyExpression expression)
Parameters
Type | Name | Description |
---|---|---|
DeleteForeignKeyExpression | expression | The expression to create the SQL for |
Returns
Type | Description |
---|---|
string | The generated SQL |
Generate(DeleteIndexExpression)
Generates an SQL statement to drop an index
Declaration
string Generate(DeleteIndexExpression expression)
Parameters
Type | Name | Description |
---|---|---|
DeleteIndexExpression | expression | The expression to create the SQL for |
Returns
Type | Description |
---|---|
string | The generated SQL |
Generate(DeleteSchemaExpression)
Generates a DROP SCHEMA
SQL statement
Declaration
string Generate(DeleteSchemaExpression expression)
Parameters
Type | Name | Description |
---|---|---|
DeleteSchemaExpression | expression | The expression to create the SQL for |
Returns
Type | Description |
---|---|
string | The generated SQL |
Generate(DeleteSequenceExpression)
Generates a DROP SEQUENCE
SQL statement
Declaration
string Generate(DeleteSequenceExpression expression)
Parameters
Type | Name | Description |
---|---|---|
DeleteSequenceExpression | expression | The expression to create the SQL for |
Returns
Type | Description |
---|---|
string | The generated SQL |
Generate(DeleteTableExpression)
Generates a DROP TABLE
SQL statement
Declaration
string Generate(DeleteTableExpression expression)
Parameters
Type | Name | Description |
---|---|---|
DeleteTableExpression | expression | The expression to create the SQL for |
Returns
Type | Description |
---|---|
string | The generated SQL |
Generate(InsertDataExpression)
Generates an SQL statement to INSERT data
Declaration
string Generate(InsertDataExpression expression)
Parameters
Type | Name | Description |
---|---|---|
InsertDataExpression | expression | The expression to create the SQL for |
Returns
Type | Description |
---|---|
string | The generated SQL |
Generate(RenameColumnExpression)
Generates an SQL statement to rename a column
Declaration
string Generate(RenameColumnExpression expression)
Parameters
Type | Name | Description |
---|---|---|
RenameColumnExpression | expression | The expression to create the SQL for |
Returns
Type | Description |
---|---|
string | The generated SQL |
Generate(RenameTableExpression)
Generates an SQL statement to rename a table
Declaration
string Generate(RenameTableExpression expression)
Parameters
Type | Name | Description |
---|---|---|
RenameTableExpression | expression | The expression to create the SQL for |
Returns
Type | Description |
---|---|
string | The generated SQL |
Generate(UpdateDataExpression)
Generates an SQL statement to UPDATE data
Declaration
string Generate(UpdateDataExpression expression)
Parameters
Type | Name | Description |
---|---|---|
UpdateDataExpression | expression | The expression to create the SQL for |
Returns
Type | Description |
---|---|
string | The generated SQL |