I saw some old topics about this but I couldn't achive to run Sql commands in order to perform the check before table creation. Which way or service should I use?
NopCommerce Version is 4.80.
Server is Microsoft Sql Server.
It runs in my local network.
This is my SchemeMigration.cs file:
[NopMigration("2025-01-21 17:07:00:1111111", "Create NotificationBar", MigrationProcessType.Installation)]
public class SchemeMigration : Migration //AutoReversingMigration
{
protected readonly IMigrationManager _migrationManager;
public SchemeMigration(IMigrationManager migrationManager)
{
_migrationManager = migrationManager;
}
public override void Up()
{
// Here, check if the table already exists
Create.TableFor<QuestionEntity>();
}
public override void Down()
{
Delete.Table("Question");
}