How ever, the TableExists returns true even the table is not in the database.
[TableName(TableName)]
[PrimaryKey(nameof(SectionId))]
[ExplicitColumns]
public class Section
{
public const string TableName = "custom" + nameof(Section);
[Column(nameof(SectionId))]
[PrimaryKeyColumn]
public int SectionId { get; set; }
[Column(nameof(Name))]
public string Name { get; set; }
}
I can run Create.Table<Section>().Do(); as many times in the migration as I want without it throwing exceptions.
I installed "Skybrud.Umbraco.Redirects"-package, do I need to continue on that migration for it to work?
Umbraco Custom Table not added to database
Hi. I followed the tutorial here:
https://our.umbraco.com/documentation/extending/database/
How ever, the
TableExists
returns true even the table is not in the database.I can run
Create.Table<Section>().Do();
as many times in the migration as I want without it throwing exceptions.I installed "Skybrud.Umbraco.Redirects"-package, do I need to continue on that migration for it to work?
Are you seeing any errors in the Umbraco logs that may indicate what is happening, if not maybe try adding some logging to your composer.
Does you SQL user have the required permission to create the table?
Do you have access to SQL logs to see if anything in there helps diagnose the problem?
Somehow, despite having a specified connectionstring to my local SQL server. It still takes the sql ce database in the App_Data folder.
If I remove the database I cannot run the solution.
Can anyone explain this?
This is fixed. PEBKAC :)
:) glad you sorted it
is working on a reply...