Beispiel #1
0
        protected override void Generate(AddNotNullConstraint op)
        {
            using (var sql = this.Writer())
            {
                string columnDefaultValue = this.GetDefaultValue(op.DataType);

                var text = string.Format(@"UPDATE {0} SET {1} = {2} WHERE {1} IS NULL",
                    this.Quote(op.TableName), this.Quote(op.ColumnName), columnDefaultValue);
                sql.Write(text);

                this.AddRun(sql);
            }

            this.AddNotNullConstraint(op);
        }
Beispiel #2
0
 protected abstract void Generate(AddNotNullConstraint op);