/// <summary> /// Drops the <see cref="PrimaryKeyConstraint"/> with the specified <paramref name="name"/>. /// </summary> /// <param name="name">The constraint's name.</param> /// <returns>The constraint.</returns> public PrimaryKeyConstraint DropPrimaryKeyConstraint(string name) { var c = new PrimaryKeyConstraint(this, name, Modifier.Drop); Database.MigrationSteps.Enqueue(c); return(c); }
/// <summary> /// Adds a primary key <see cref="Constraint"/> to this <see cref="Table"/>. /// </summary> /// <param name="name">The name of the constraint.</param> /// <param name="columnNames">The column name(s) that make(s) up the primary key.</param> /// <returns>The primary key constraint.</returns> public PrimaryKeyConstraint AddPrimaryKeyConstraint(string name, string[] columnNames) { var c = new PrimaryKeyConstraint(this, name, Modifier.Add) { ColumnNames = columnNames }; Database.MigrationSteps.Enqueue(c); return(c); }
/// <summary> /// Drops the <see cref="PrimaryKeyConstraint"/> with the specified <paramref name="name"/>. /// </summary> /// <param name="name">The constraint's name.</param> /// <returns>The constraint.</returns> public PrimaryKeyConstraint DropPrimaryKeyConstraint(string name) { var c = new PrimaryKeyConstraint(this, name, Modifier.Drop); Database.MigrationSteps.Enqueue(c); return c; }
/// <summary> /// Adds a primary key <see cref="Constraint"/> to this <see cref="Table"/>. /// </summary> /// <param name="name">The name of the constraint.</param> /// <param name="columnNames">The column name(s) that make(s) up the primary key.</param> /// <returns>The primary key constraint.</returns> public PrimaryKeyConstraint AddPrimaryKeyConstraint(string name, string[] columnNames) { var c = new PrimaryKeyConstraint(this, name, Modifier.Add) { ColumnNames = columnNames }; Database.MigrationSteps.Enqueue(c); return c; }