Skip to content

Commit

Permalink
fixup! Add a check for column default expressions in the electrify() …
Browse files Browse the repository at this point in the history
…call
  • Loading branch information
alco committed Sep 29, 2023
1 parent 4f1d237 commit a4e25e6
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions e2e/init.sql
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
CREATE TABLE entries (
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
id UUID PRIMARY KEY,
content VARCHAR NOT NULL,
content_b TEXT
);

CREATE TABLE owned_entries (
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
id UUID PRIMARY KEY,
electric_user_id TEXT NOT NULL,
content VARCHAR NOT NULL
);
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
BEGIN;

CREATE TABLE items (
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
id UUID PRIMARY KEY,
content VARCHAR NOT NULL
);
CALL electric.electrify('public.items');
Expand Down
4 changes: 2 additions & 2 deletions e2e/tests/03.11_node_satellite_compensations_work.lux
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
id TEXT PRIMARY KEY,
content TEXT NOT NULL,
content_text_null TEXT,
content_text_null_default TEXT DEFAULT '',
content_text_null_default TEXT,
intvalue_null integer,
intvalue_null_default integer DEFAULT 10
intvalue_null_default integer
);
CREATE TABLE public.other_items (
id TEXT PRIMARY KEY,
Expand Down
6 changes: 3 additions & 3 deletions e2e/tests/03.13_node_satellite_can_sync_timestamps.lux
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
[local sql=
"""
CREATE TABLE public.timestamps (
id TEXT PRIMARY KEY DEFAULT uuid_generate_v4(),
created_at TIMESTAMP NOT NULL DEFAULT now(),
updated_at TIMESTAMPTZ NOT NULL DEFAULT now()
id TEXT PRIMARY KEY,
created_at TIMESTAMP NOT NULL,
updated_at TIMESTAMPTZ NOT NULL
);
CALL electric.electrify('public.timestamps');
"""]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
[local sql=
"""
CREATE TABLE public.datetimes (
id TEXT PRIMARY KEY DEFAULT uuid_generate_v4(),
id TEXT PRIMARY KEY,
d DATE,
t TIME
);
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/03.15_node_satellite_can_sync_booleans.lux
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
[local sql=
"""
CREATE TABLE public.bools (
id TEXT PRIMARY KEY DEFAULT uuid_generate_v4(),
id TEXT PRIMARY KEY,
b BOOLEAN
);
CALL electric.electrify('public.bools');
Expand Down
6 changes: 3 additions & 3 deletions e2e/tests/_shared.luxinc
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,12 @@
[local sql=
"""
CREATE TABLE public.items (
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
id UUID PRIMARY KEY,
content VARCHAR NOT NULL,
content_text_null VARCHAR,
content_text_null_default VARCHAR DEFAULT '',
content_text_null_default VARCHAR,
intvalue_null integer,
intvalue_null_default integer DEFAULT 10
intvalue_null_default integer
);
CALL electric.electrify('public.items');
"""]
Expand Down

0 comments on commit a4e25e6

Please sign in to comment.