Can we drop the Sequence from SQL SERVER when we drop a table ?
In my Nighly build process I recreate my database with DropTable and CreateTable method then I seed my data.
It seem that the DropTable does not drop the Sequence so the CreateTable failed with no error that I can see.
If I look in my DB with SSMS I see my table disappeared but the CreateTable do not bring back my table.
If we can’t drop the Sequence can we make the CreateTable work and check if the sequence exist ?
I use SqlServer2016Dialect.Provider.
db.DropTable<DietResult>();
db.CreateTable<DietResult>();
[Schema("REIBeef")] //Specifique to REIBeef
public class DietResult
{
[Sequence("DietId"), ReturnOnInsert]
public int DietId { get; set; }
public int AccessFiber { get; set; }
public int MainFiber { get; set; }
public int FiberQuality { get; set; }
public int FiberRegularity { get; set; }
public bool ValidCategory { get; set; }
public ulong RowVersion { get; set; }
[Default(OrmLiteVariables.SystemUtc)]
public DateTime? CreatedDateUtc { get; set; }
[Default(OrmLiteVariables.SystemUtc)]
public DateTime? UpdatedDateUtc { get; set; }
[PrimaryKey, AutoId, ReturnOnInsert]
public Guid? RowId { get; set; }
}