-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Description
I am trying to run my migrations as an SQL script inside my TimescaleDB docker container.
I am getting the following error from the DB:
I have tried to manually edit the SQL script and use PERFORM instead of the SELECT in front of the create_hypertable which fixed the problem and made the script run as expected.
This fix seems to work and the script is applied. Could be nice to fix this with the designer, so the dotnet tool outputs valid SQL scripts.
2026-03-30 10:46:36.122 UTC [81] ERROR: query has no destination for result data
2026-03-30 10:46:36.122 UTC [81] HINT: If you want to discard the results of a SELECT, use PERFORM instead.
2026-03-30 10:46:36.122 UTC [81] CONTEXT: PL/pgSQL function inline_code_block line 5 at SQL statement
2026-03-30 10:46:36.122 UTC [81] STATEMENT: DO $EF$
BEGIN
IF NOT EXISTS(SELECT 1 FROM "__EFMigrationsHistory" WHERE "MigrationId" = '20260327140529_Initial') THEN
SELECT create_hypertable('public."Events"', 'CapturedAt', chunk_time_interval => INTERVAL '1 day');
DO $$
DECLARE
license TEXT;
Steps to reproduce
- Create Migration for DbContext with HyperTable
- run dotnet ef migrations script --idempotent
- Try applying the SQL against the DB
- Confirm that the SQL script fails
Expected behavior
I would expect it to generate appropriate SQL scripts
.NET version
10.0
TimescaleDB version
2.26.0-pg17
Eftdb version
10.0.2
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working