squawk icon indicating copy to clipboard operation
squawk copied to clipboard

Add option to ignore "create table"

Open wosc opened this issue 1 year ago • 0 comments

Our alembic-based setup includes "starter" migrations that create the tables. So if I alembic upgrade head --sql | squawk, this dumps out all migrations, but I get no analysis whatsoever, since squawk seems to decide "hey all these tables are new, so there can be no conflicts". So, could we have a squawk option to... not do that? Or am I holding things wrong, somehow?

Example
$ squawk <<EOF
BEGIN;

-- Running upgrade  -> 553e4856ccbb
CREATE TABLE example (
    id UUID NOT NULL,
    PRIMARY KEY (id)  
);
COMMIT;
BEGIN;

-- Running upgrade 553e4856ccbb -> 89a2a1ae92fb
ALTER TABLE example ADD COLUMN name VARCHAR;
CREATE INDEX ix_example_name ON example (name);
COMMIT;
EOF

says Found 0 issues in 1 file instead of require-concurrent-index-creation

wosc avatar Jul 05 '24 09:07 wosc