-
Notifications
You must be signed in to change notification settings - Fork 29
Database Conventions
Chui Tey edited this page Jun 5, 2016
·
4 revisions
Database conventions execute SQL on your target database which analyzes its structure and definitions, and returns information if it isn't in the shape you want it to be in.
All database conventions derive from DatabaseConventionSpecification
TheDatabase
.WithConnectionString("YourConnectionString")
.MustConformTo(Convention.AllIdentityColumnsMustBeNamedTableNameId)
.WithFailureAssertion(Assert.Fail);
- All identity columns must be named tablenameId
- All tables must have a clustered index
- All check constraints must be explicitly named
- All default constraints must be explicitly named
- All reference constraints must be explicitly named
- All unique constraints must be explicitly named
- All columns with given name must be nullable
- All columns with given name must be non-nullable
- All rows in table must have corresponding
enum
entry.