Class MySqlMigrationSqlGenerator
Implementation of a MySql's Sql generator for EF 4.3 data migrations.
Inheritance
Namespace: MySql.Data.EntityFramework
Assembly: MySql.Data.EntityFramework.dll
Version: 9.3.0
Syntax
public class MySqlMigrationSqlGenerator : MigrationSqlGenerator
Constructors
MySqlMigrationSqlGenerator()
Declaration
public MySqlMigrationSqlGenerator()
Methods
Generate(AddColumnOperation)
Generates a migration operation to add a column.
Declaration
protected virtual MigrationStatement Generate(AddColumnOperation op)
Parameters
Type | Name | Description |
---|---|---|
Add |
op | The operation that represents a column being added to a table. |
Returns
Type | Description |
---|---|
Migration |
A migration operation to add a column. |
Generate(AddForeignKeyOperation)
Generates a migration operation to add a foreign key.
Declaration
protected virtual MigrationStatement Generate(AddForeignKeyOperation op)
Parameters
Type | Name | Description |
---|---|---|
Add |
op | the operation that represents a foreing key constraint being added to a table. |
Returns
Type | Description |
---|---|
Migration |
A migration operation to add a foreign key constraint. |
Generate(AddPrimaryKeyOperation)
Generates a migration operation to add a primary key to a table.
Declaration
protected virtual MigrationStatement Generate(AddPrimaryKeyOperation op)
Parameters
Type | Name | Description |
---|---|---|
Add |
op | The operation that represents adding a primary key to a table. |
Returns
Type | Description |
---|---|
Migration |
A migration operation to add a primary key to a table. |
Generate(AlterColumnOperation)
Generates a migration operation to alter a column.
Declaration
protected virtual MigrationStatement Generate(AlterColumnOperation op)
Parameters
Type | Name | Description |
---|---|---|
Alter |
op | The operation that represents altering an existing column. |
Returns
Type | Description |
---|---|
Migration |
A migration operation to alter a column. |
Generate(ColumnModel)
Generates an SQL statement of a column model.
Declaration
protected virtual string Generate(ColumnModel op)
Parameters
Type | Name | Description |
---|---|---|
Column |
op | The model that represents a column. |
Returns
Type | Description |
---|---|
System. |
A string containing an SQL statement of a column model. |
Generate(CreateIndexOperation)
Generates a migration operation to create a database index.
Declaration
protected virtual MigrationStatement Generate(CreateIndexOperation op)
Parameters
Type | Name | Description |
---|---|---|
Create |
op | The operation that represents creating a database index. |
Returns
Type | Description |
---|---|
Migration |
A migration operation to create a database index. |
Generate(CreateProcedureOperation)
Declaration
protected virtual MigrationStatement Generate(CreateProcedureOperation op)
Parameters
Type | Name | Description |
---|---|---|
Create |
op |
Returns
Type | Description |
---|---|
Migration |
Generate(CreateTableOperation)
Generates a migration operation to create a table.
Declaration
protected virtual MigrationStatement Generate(CreateTableOperation op)
Parameters
Type | Name | Description |
---|---|---|
Create |
op | The operation that represents creating a table. |
Returns
Type | Description |
---|---|
Migration |
A migration operation to create a table. |
Generate(DropColumnOperation)
Generates a migration operation to drop a column.
Declaration
protected virtual MigrationStatement Generate(DropColumnOperation op)
Parameters
Type | Name | Description |
---|---|---|
Drop |
op | The operation that represents a column being dropped from a table. |
Returns
Type | Description |
---|---|
Migration |
The migration operation to drop a column. |
Generate(DropForeignKeyOperation)
Generates a migration operation to drop a foreign key constraint from a table.
Declaration
protected virtual MigrationStatement Generate(DropForeignKeyOperation op)
Parameters
Type | Name | Description |
---|---|---|
Drop |
op | The operation that represents a foreign key being added from a table. |
Returns
Type | Description |
---|---|
Migration |
A migration operation to drop a foreign key. |
Generate(DropIndexOperation)
Generates a migration operation to drop an existing database index.
Declaration
protected virtual MigrationStatement Generate(DropIndexOperation op)
Parameters
Type | Name | Description |
---|---|---|
Drop |
op | The operation that represents dropping am existing database index. |
Returns
Type | Description |
---|---|
Migration |
A migration operation to drop an existing database index. |
Generate(DropPrimaryKeyOperation)
Generates a migration operation to drpo an existing primary key.
Declaration
protected virtual MigrationStatement Generate(DropPrimaryKeyOperation op)
Parameters
Type | Name | Description |
---|---|---|
Drop |
op | The operation that represents dropping an existing primary key. |
Returns
Type | Description |
---|---|
Migration |
A migration operation to drop an existing primary key. |
Generate(DropTableOperation)
Generates a migration operation to drop an existing table.
Declaration
protected virtual MigrationStatement Generate(DropTableOperation op)
Parameters
Type | Name | Description |
---|---|---|
Drop |
op | The operation that represents dropping an existing table. |
Returns
Type | Description |
---|---|
Migration |
A migration operation to drop an existing table. |
Generate(HistoryOperation)
Declaration
protected virtual MigrationStatement Generate(HistoryOperation op)
Parameters
Type | Name | Description |
---|---|---|
History |
op |
Returns
Type | Description |
---|---|
Migration |
Generate(MoveTableOperation)
Not implemented yet.
Declaration
protected virtual MigrationStatement Generate(MoveTableOperation op)
Parameters
Type | Name | Description |
---|---|---|
Move |
op | NA |
Returns
Type | Description |
---|---|
Migration |
NA |
Generate(RenameColumnOperation)
Generates a migration operation to rename a column.
Declaration
protected virtual MigrationStatement Generate(RenameColumnOperation op)
Parameters
Type | Name | Description |
---|---|---|
Rename |
op | The operation that represents a column being renamed. |
Returns
Type | Description |
---|---|
Migration |
A migration operation to rename a column. |
Generate(RenameTableOperation)
Generates a migration operation to rename an existing table.
Declaration
protected virtual MigrationStatement Generate(RenameTableOperation op)
Parameters
Type | Name | Description |
---|---|---|
Rename |
op | The operation that represents renaming an existing table. |
Returns
Type | Description |
---|---|
Migration |
A migration operation to rename an existing table. |
Generate(SqlOperation)
Generates a migration operation with a MySQL statement to be executed.
Declaration
protected virtual MigrationStatement Generate(SqlOperation op)
Parameters
Type | Name | Description |
---|---|---|
Sql |
op | The operation representing a MySQL statement to be executed directly against the database. |
Returns
Type | Description |
---|---|
Migration |
A migration operation with a MySQL statement to be executed. |
Generate(IEnumerable<MigrationOperation>, String)
Declaration
public override IEnumerable<MigrationStatement> Generate(IEnumerable<MigrationOperation> migrationOperations, string providerManifestToken)
Parameters
Type | Name | Description |
---|---|---|
System. |
migrationOperations | |
System. |
providerManifestToken |
Returns
Type | Description |
---|---|
System. |
GenerateProcedureBody(ICollection<DbModificationCommandTree>, String, String)
Declaration
public override string GenerateProcedureBody(ICollection<DbModificationCommandTree> commandTrees, string rowsAffectedParameter, string providerManifestToken)
Parameters
Type | Name | Description |
---|---|---|
System. |
commandTrees | |
System. |
rowsAffectedParameter | |
System. |
providerManifestToken |
Returns
Type | Description |
---|---|
System. |