public override Column Build(TableBuilder table, ISchemaProvider schemaProvider, IList <PostProcess> posts) { Column col = base.Build(table, schemaProvider, posts); posts.Add(new PostProcess( delegate() { string fkName = "FK_" + SchemaUtils.Normalize(table.Name) + "_" + SchemaUtils.Normalize(col.Name) + "_" + SchemaUtils.Normalize(targetColName); schemaProvider.AddForeignKeyConstraint( table.Name, fkName, col.Name, targetTable, targetColName); })); return(col); }
public void Normalize_RemoveMark() { Assert.AreEqual("KEY", SchemaUtils.Normalize("`Key`")); }
public void Normalize_RemoveBrackets() { Assert.AreEqual("USER", SchemaUtils.Normalize("[user]")); }
public void Normalize_WontChangeValidIdentifier() { Assert.AreEqual("NAME", SchemaUtils.Normalize("Name")); }