protected virtual Constraint MigrateConstraintOrIndex(Constraint cnt, IMigrationProfile profile, IProgressInfo progress) { if (cnt is IPrimaryKey) { if (DialectCaps.AnonymousPrimaryKey) { PrimaryKey pk = (PrimaryKey)cnt; pk.Name = DbObjectNameTool.PkName(pk.Table.FullName); } } return(cnt); }
internal override string DoCreateName(ISqlDialect dialect) { if (dialect != null && dialect.DialectCaps.AnonymousPrimaryKey && Type == EditorIndexOrKeyType.PrimaryKey) { return(null); } switch (Type) { case EditorIndexOrKeyType.PrimaryKey: return(DbObjectNameTool.PkName(m_table)); case EditorIndexOrKeyType.Index: return(DbObjectNameTool.IndexName(m_table, m_columns)); case EditorIndexOrKeyType.UniqueConstraint: return(DbObjectNameTool.UniqueName(m_table, m_columns)); } throw new InternalError("DAE-00176 internal error"); }