-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Labels
Description
What happens?
My apologies if this isn't a bug, but I'm fairly sure that this SQL syntax should be valid.
The SQL statements mentioned below yields the error:
SQL Error: Dependency Error: Cannot alter entry "articles" because there are entries that depend on it.
To Reproduce
This is the typical pattern a schema generation script would follow, dropping entities if they exist and then recreating. Parent entities are handled first.
Removing the INDEX statements solves the error, but the index is required.
DROP TABLE IF EXISTS articles CASCADE;
CREATE TABLE articles (
id INTEGER PRIMARY KEY,
uuid uuid NOT NULL UNIQUE,
title TEXT NOT NULL UNIQUE,
body TEXT NOT NULL,
);
DROP INDEX IF EXISTS idx_articles_title; CREATE UNIQUE INDEX idx_articles_title ON articles(LOWER(title));
DROP TABLE IF EXISTS comments CASCADE;
CREATE TABLE comments (
article_id INTEGER REFERENCES articles(id) ,
comment TEXT NOT NULL,
);
OS:
x64
DuckDB Version:
64
DuckDB Client:
DuckDB CLI
Full Name:
Francois Botha
Affiliation:
Personal capacity - trying to add support for an embedded database to listmonk
Have you tried this on the latest main
branch?
I have tested with a release build (and could not test with a main build)
Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?
- Yes, I have