Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Dialect
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20176/NHibernate/Dialect
Modified Files:
Dialect.cs MySQLDialect.cs
Log Message:
NH-173: modify how ddl is generated for MySql 4.1+
Index: Dialect.cs
===================================================================
RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Dialect/Dialect.cs,v
retrieving revision 1.43
retrieving revision 1.44
diff -C2 -d -r1.43 -r1.44
*** Dialect.cs 31 Jan 2005 03:24:43 -0000 1.43
--- Dialect.cs 9 Feb 2005 03:09:38 -0000 1.44
***************
*** 217,220 ****
--- 217,232 ----
/// <summary>
+ /// The syntax used to drop a foreign key constraint from a table.
+ /// </summary>
+ /// <param name="constraintName">The name of the foreign key constraint to drop.</param>
+ /// <returns>
+ /// The SQL string to drop the foreign key constraint.
+ /// </returns>
+ public virtual string GetDropForeignKeyConstraintString( string constraintName )
+ {
+ return " drop constraint " + constraintName;
+ }
+
+ /// <summary>
/// The syntax used to add a primary key constraint to a table
/// </summary>
***************
*** 226,229 ****
--- 238,265 ----
/// <summary>
+ /// The syntax used to drop a primary key constraint from a table.
+ /// </summary>
+ /// <param name="constraintName">The name of the primary key constraint to drop.</param>
+ /// <returns>
+ /// The SQL string to drop the primary key constraint.
+ /// </returns>
+ public virtual string GetDropPrimaryKeyConstraintString( string constraintName )
+ {
+ return " drop constraint " + constraintName;
+ }
+
+ /// <summary>
+ /// The syntax used to drop an index constraint from a table.
+ /// </summary>
+ /// <param name="constraintName">The name of the index constraint to drop.</param>
+ /// <returns>
+ /// The SQL string to drop the primary key constraint.
+ /// </returns>
+ public virtual string GetDropIndexConstraintString( string constraintName )
+ {
+ return " drop constraint " + constraintName;
+ }
+
+ /// <summary>
/// The keyword used to specify a nullable column
/// </summary>
Index: MySQLDialect.cs
===================================================================
RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Dialect/MySQLDialect.cs,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** MySQLDialect.cs 30 Jan 2005 19:39:11 -0000 1.25
--- MySQLDialect.cs 9 Feb 2005 03:09:38 -0000 1.26
***************
*** 80,89 ****
/// <summary></summary>
- public override bool DropConstraints
- {
- get { return false; }
- }
-
- /// <summary></summary>
public override bool QualifyIndexName
{
--- 80,83 ----
***************
*** 178,181 ****
--- 172,205 ----
.ToString();
}
+
+ /// <summary>
+ /// Create the SQL string to drop a foreign key constraint.
+ /// </summary>
+ /// <param name="constraintName">The name of the foreign key to drop.</param>
+ /// <returns>The SQL string to drop the foreign key constraint.</returns>
+ public override string GetDropForeignKeyConstraintString(string constraintName)
+ {
+ return " drop foreign key " + constraintName;
+ }
+
+ /// <summary>
+ /// Create the SQL string to drop a primary key constraint.
+ /// </summary>
+ /// <param name="constraintName">The name of the primary key to drop.</param>
+ /// <returns>The SQL string to drop the primary key constraint.</returns>
+ public override string GetDropPrimaryKeyConstraintString(string constraintName)
+ {
+ return " drop primary key " + constraintName;
+ }
+
+ /// <summary>
+ /// Create the SQL string to drop an index.
+ /// </summary>
+ /// <param name="constraintName">The name of the index to drop.</param>
+ /// <returns>The SQL string to drop the index constraint.</returns>
+ public override string GetDropIndexConstraintString(string constraintName)
+ {
+ return " drop index " + constraintName;
+ }
}
}
\ No newline at end of file
|