Hello to all,
I’m trying to add a column to a table that not use the default schema in SqlServer e SqlLite. The table POCO have the attribute “Schema” set, when I execute the AddColumn method I receive this error: “Cannot find the object “Identities” because it does not exist or you do not have permissions”.
I’m doing something wrong or is it a not supported function? Currently i’m using ServiceStack 4.5.12.
This is the poco definition:
[Schema("core")]
[Alias("Identities")]
public class Identity : IIdentity
{
[StringLength(50)]
public string RegisterNumber { get; set; }
...
}
This is the schema upgrade implementation:
using (var ctx = dbFactory.OpenDbConnection())
{
if (!ctx.ColumnExists<Identity>(c => c.RegisterNumber))
ctx.AddColumn<Identity>(c => c.RegisterNumber);
}
Thanks to all