Skip to content

Commit

Permalink
Merge pull request #79 from tansu-io/78-stop-using-serial-in-postgres…
Browse files Browse the repository at this point in the history
…-storage-engine

switch to generated always as identity rather than serial
  • Loading branch information
shortishly authored Oct 18, 2024
2 parents e9ebb05 + 458e636 commit acd2bfe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions work-dir/initdb.d/010-schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
begin;

create table cluster (
id serial primary key,
id int generated always as identity primary key,
name text not null,
unique (name),
last_updated timestamp default current_timestamp not null,
created_at timestamp default current_timestamp not null
);

create table broker (
id serial primary key,
id int generated always as identity primary key,
cluster integer references cluster(id) not null,
node integer not null,
rack text,
Expand All @@ -36,7 +36,7 @@ create table broker (
);

create table listener (
id serial primary key,
id int generated always as identity primary key,
broker integer references broker(id) not null,
name text not null,
host text not null,
Expand Down Expand Up @@ -103,7 +103,7 @@ create type "Compression" as enum (
);

create table record (
id bigserial primary key not null,
id bigint generated always as identity primary key,
topic uuid references topic(id),
partition integer,
producer_id bigint,
Expand Down

0 comments on commit acd2bfe

Please sign in to comment.