appany / AppAny.Quartz.EntityFrameworkCore.Migrations

EntityFrameworkCore PostgreSQL migrations for Quartz.NET
MIT License
70 stars 19 forks source link

Removed the use of schema for Sqlite as this is not supported by Sqlite and causes warnings during migrations #55

Closed JasonLandbridge closed 1 year ago

JasonLandbridge commented 1 year ago

Hi there again,

I got a chance to migrate my project using a sqlite database which gave many warnings as shown here:

Build started...
Build succeeded.
The Entity Framework tools version '6.0.4' is older than that of the runtime '6.0.6'. Update the tools for the latest features and bug fixes. See https://aka.ms/AAc1fbw for more information.
The entity type 'QuartzBlobTrigger' is configured to use schema 'quartz', but SQLite does not support schemas. This configuration will be ignored by the SQLite provider.
The entity type 'QuartzCalendar' is configured to use schema 'quartz', but SQLite does not support schemas. This configuration will be ignored by the SQLite provider.
The entity type 'QuartzCronTrigger' is configured to use schema 'quartz', but SQLite does not support schemas. This configuration will be ignored by the SQLite provider.
The entity type 'QuartzFiredTrigger' is configured to use schema 'quartz', but SQLite does not support schemas. This configuration will be ignored by the SQLite provider.
The entity type 'QuartzJobDetail' is configured to use schema 'quartz', but SQLite does not support schemas. This configuration will be ignored by the SQLite provider.
The entity type 'QuartzLock' is configured to use schema 'quartz', but SQLite does not support schemas. This configuration will be ignored by the SQLite provider.
The entity type 'QuartzPausedTriggerGroup' is configured to use schema 'quartz', but SQLite does not support schemas. This configuration will be ignored by the SQLite provider.
The entity type 'QuartzSchedulerState' is configured to use schema 'quartz', but SQLite does not support schemas. This configuration will be ignored by the SQLite provider.
The entity type 'QuartzSimplePropertyTrigger' is configured to use schema 'quartz', but SQLite does not support schemas. This configuration will be ignored by the SQLite provider.
The entity type 'QuartzSimpleTrigger' is configured to use schema 'quartz', but SQLite does not support schemas. This configuration will be ignored by the SQLite provider.
The entity type 'QuartzTrigger' is configured to use schema 'quartz', but SQLite does not support schemas. This configuration will be ignored by the SQLite provider.

Even though it says that the configuration is ignored, in my migration files the schema is still set:

migrationBuilder.CreateTable(
    name: "QRTZ_CRON_TRIGGERS",
    schema: "quartz",
    columns: table => new
    {
        SCHED_NAME = table.Column<string>(type: "text", nullable: false),
        TRIGGER_NAME = table.Column<string>(type: "text", nullable: false),
        TRIGGER_GROUP = table.Column<string>(type: "text", nullable: false),
        CRON_EXPRESSION = table.Column<string>(type: "text", nullable: false),
        TIME_ZONE_ID = table.Column<string>(type: "text", nullable: true)
    },
    constraints: table =>
    {
        table.PrimaryKey("PK_QRTZ_CRON_TRIGGERS", x => new { x.SCHED_NAME, x.TRIGGER_NAME, x.TRIGGER_GROUP });
        table.ForeignKey(
            name: "FK_QRTZ_CRON_TRIGGERS_QRTZ_TRIGGERS_SCHED_NAME_TRIGGER_NAME_TRIGGER_GROUP",
            columns: x => new { x.SCHED_NAME, x.TRIGGER_NAME, x.TRIGGER_GROUP },
            principalSchema: "quartz",
            principalTable: "QRTZ_TRIGGERS",
            principalColumns: new[] { "SCHED_NAME", "TRIGGER_NAME", "TRIGGER_GROUP" },
            onDelete: ReferentialAction.Cascade);
    });

migrationBuilder.CreateTable(
    name: "QRTZ_SIMPLE_TRIGGERS",
    schema: "quartz",
    columns: table => new
    {
        SCHED_NAME = table.Column<string>(type: "text", nullable: false),
        TRIGGER_NAME = table.Column<string>(type: "text", nullable: false),
        TRIGGER_GROUP = table.Column<string>(type: "text", nullable: false),
        REPEAT_COUNT = table.Column<long>(type: "bigint", nullable: false),
        REPEAT_INTERVAL = table.Column<long>(type: "bigint", nullable: false),
        TIMES_TRIGGERED = table.Column<long>(type: "bigint", nullable: false)
    },
    constraints: table =>
    {
        table.PrimaryKey("PK_QRTZ_SIMPLE_TRIGGERS", x => new { x.SCHED_NAME, x.TRIGGER_NAME, x.TRIGGER_GROUP });
        table.ForeignKey(
            name: "FK_QRTZ_SIMPLE_TRIGGERS_QRTZ_TRIGGERS_SCHED_NAME_TRIGGER_NAME_TRIGGER_GROUP",
            columns: x => new { x.SCHED_NAME, x.TRIGGER_NAME, x.TRIGGER_GROUP },
            principalSchema: "quartz",
            principalTable: "QRTZ_TRIGGERS",
            principalColumns: new[] { "SCHED_NAME", "TRIGGER_NAME", "TRIGGER_GROUP" },
            onDelete: ReferentialAction.Cascade);
    });

I therefore removed all the schema options for the Sqlite package

codecov-commenter commented 1 year ago

Codecov Report

Base: 95.27% // Head: 95.25% // Decreases project coverage by -0.02% :warning:

Coverage data is based on head (055dcde) compared to base (9a55836). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #55 +/- ## ========================================== - Coverage 95.27% 95.25% -0.03% ========================================== Files 63 63 Lines 2012 2001 -11 Branches 2 2 ========================================== - Hits 1917 1906 -11 Misses 94 94 Partials 1 1 ``` | [Impacted Files](https://codecov.io/gh/appany/AppAny.Quartz.EntityFrameworkCore.Migrations/pull/55?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=appany) | Coverage Δ | | |---|---|---| | [...ations/QuartzBlobTriggerEntityTypeConfiguration.cs](https://codecov.io/gh/appany/AppAny.Quartz.EntityFrameworkCore.Migrations/pull/55/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=appany#diff-c3JjL0FwcEFueS5RdWFydHouRW50aXR5RnJhbWV3b3JrQ29yZS5NaWdyYXRpb25zLlNRTGl0ZS9FbnRpdHlUeXBlQ29uZmlndXJhdGlvbnMvUXVhcnR6QmxvYlRyaWdnZXJFbnRpdHlUeXBlQ29uZmlndXJhdGlvbi5jcw==) | `100.00% <100.00%> (ø)` | | | [...gurations/QuartzCalendarEntityTypeConfiguration.cs](https://codecov.io/gh/appany/AppAny.Quartz.EntityFrameworkCore.Migrations/pull/55/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=appany#diff-c3JjL0FwcEFueS5RdWFydHouRW50aXR5RnJhbWV3b3JrQ29yZS5NaWdyYXRpb25zLlNRTGl0ZS9FbnRpdHlUeXBlQ29uZmlndXJhdGlvbnMvUXVhcnR6Q2FsZW5kYXJFbnRpdHlUeXBlQ29uZmlndXJhdGlvbi5jcw==) | `100.00% <100.00%> (ø)` | | | [...ations/QuartzCronTriggerEntityTypeConfiguration.cs](https://codecov.io/gh/appany/AppAny.Quartz.EntityFrameworkCore.Migrations/pull/55/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=appany#diff-c3JjL0FwcEFueS5RdWFydHouRW50aXR5RnJhbWV3b3JrQ29yZS5NaWdyYXRpb25zLlNRTGl0ZS9FbnRpdHlUeXBlQ29uZmlndXJhdGlvbnMvUXVhcnR6Q3JvblRyaWdnZXJFbnRpdHlUeXBlQ29uZmlndXJhdGlvbi5jcw==) | `100.00% <100.00%> (ø)` | | | [...tions/QuartzFiredTriggerEntityTypeConfiguration.cs](https://codecov.io/gh/appany/AppAny.Quartz.EntityFrameworkCore.Migrations/pull/55/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=appany#diff-c3JjL0FwcEFueS5RdWFydHouRW50aXR5RnJhbWV3b3JrQ29yZS5NaWdyYXRpb25zLlNRTGl0ZS9FbnRpdHlUeXBlQ29uZmlndXJhdGlvbnMvUXVhcnR6RmlyZWRUcmlnZ2VyRW50aXR5VHlwZUNvbmZpZ3VyYXRpb24uY3M=) | `100.00% <100.00%> (ø)` | | | [...urations/QuartzJobDetailEntityTypeConfiguration.cs](https://codecov.io/gh/appany/AppAny.Quartz.EntityFrameworkCore.Migrations/pull/55/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=appany#diff-c3JjL0FwcEFueS5RdWFydHouRW50aXR5RnJhbWV3b3JrQ29yZS5NaWdyYXRpb25zLlNRTGl0ZS9FbnRpdHlUeXBlQ29uZmlndXJhdGlvbnMvUXVhcnR6Sm9iRGV0YWlsRW50aXR5VHlwZUNvbmZpZ3VyYXRpb24uY3M=) | `100.00% <100.00%> (ø)` | | | [...onfigurations/QuartzLockEntityTypeConfiguration.cs](https://codecov.io/gh/appany/AppAny.Quartz.EntityFrameworkCore.Migrations/pull/55/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=appany#diff-c3JjL0FwcEFueS5RdWFydHouRW50aXR5RnJhbWV3b3JrQ29yZS5NaWdyYXRpb25zLlNRTGl0ZS9FbnRpdHlUeXBlQ29uZmlndXJhdGlvbnMvUXVhcnR6TG9ja0VudGl0eVR5cGVDb25maWd1cmF0aW9uLmNz) | `100.00% <100.00%> (ø)` | | | [...QuartzPausedTriggerGroupEntityTypeConfiguration.cs](https://codecov.io/gh/appany/AppAny.Quartz.EntityFrameworkCore.Migrations/pull/55/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=appany#diff-c3JjL0FwcEFueS5RdWFydHouRW50aXR5RnJhbWV3b3JrQ29yZS5NaWdyYXRpb25zLlNRTGl0ZS9FbnRpdHlUeXBlQ29uZmlndXJhdGlvbnMvUXVhcnR6UGF1c2VkVHJpZ2dlckdyb3VwRW50aXR5VHlwZUNvbmZpZ3VyYXRpb24uY3M=) | `100.00% <100.00%> (ø)` | | | [...ons/QuartzSchedulerStateEntityTypeConfiguration.cs](https://codecov.io/gh/appany/AppAny.Quartz.EntityFrameworkCore.Migrations/pull/55/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=appany#diff-c3JjL0FwcEFueS5RdWFydHouRW50aXR5RnJhbWV3b3JrQ29yZS5NaWdyYXRpb25zLlNRTGl0ZS9FbnRpdHlUeXBlQ29uZmlndXJhdGlvbnMvUXVhcnR6U2NoZWR1bGVyU3RhdGVFbnRpdHlUeXBlQ29uZmlndXJhdGlvbi5jcw==) | `100.00% <100.00%> (ø)` | | | [...rtzSimplePropertyTriggerEntityTypeConfiguration.cs](https://codecov.io/gh/appany/AppAny.Quartz.EntityFrameworkCore.Migrations/pull/55/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=appany#diff-c3JjL0FwcEFueS5RdWFydHouRW50aXR5RnJhbWV3b3JrQ29yZS5NaWdyYXRpb25zLlNRTGl0ZS9FbnRpdHlUeXBlQ29uZmlndXJhdGlvbnMvUXVhcnR6U2ltcGxlUHJvcGVydHlUcmlnZ2VyRW50aXR5VHlwZUNvbmZpZ3VyYXRpb24uY3M=) | `100.00% <100.00%> (ø)` | | | [...ions/QuartzSimpleTriggerEntityTypeConfiguration.cs](https://codecov.io/gh/appany/AppAny.Quartz.EntityFrameworkCore.Migrations/pull/55/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=appany#diff-c3JjL0FwcEFueS5RdWFydHouRW50aXR5RnJhbWV3b3JrQ29yZS5NaWdyYXRpb25zLlNRTGl0ZS9FbnRpdHlUeXBlQ29uZmlndXJhdGlvbnMvUXVhcnR6U2ltcGxlVHJpZ2dlckVudGl0eVR5cGVDb25maWd1cmF0aW9uLmNz) | `100.00% <100.00%> (ø)` | | | ... and [2 more](https://codecov.io/gh/appany/AppAny.Quartz.EntityFrameworkCore.Migrations/pull/55/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=appany) | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=appany). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=appany)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

JasonLandbridge commented 1 year ago

Updated description @sergeyshaykhullin

JasonLandbridge commented 1 year ago

Thanks for the merge @sergeyshaykhullin, not to be impatient but could you release a new version?

sergeyshaykhullin commented 1 year ago

@JasonLandbridge 0.4.0 will be released soon

JasonLandbridge commented 1 year ago

Thanks for the quick release, I can confirm it's now working correctly!