protected override string DbCreateDatabaseScript(string providerManifestToken,
StoreItemCollection storeItemCollection)
{
StringBuilder sql = new StringBuilder();
sql.AppendLine("-- MySql script");
sql.AppendLine("-- Created on " + DateTime.Now);
foreach (EntityContainer container in storeItemCollection.GetItems<EntityContainer>())
{
// now output the tables
foreach (EntitySet es in container.BaseEntitySets.OfType<EntitySet>())
{
sql.Append(GetTableCreateScript(es));
}
// now output the foreign keys
foreach (AssociationSet a in container.BaseEntitySets.OfType<AssociationSet>())
{
sql.Append(GetAssociationCreateScript(a.ElementType));
}
}
return sql.ToString();
}