-
Notifications
You must be signed in to change notification settings - Fork 2
postgres
Moritz Roessler edited this page Apr 17, 2023
·
1 revision
docker run --name my-postgres -e POSTGRES_PASSWORD=mysecretpassword -d postgres
CREATE TABLE States (
id SERIAL,
key varchar(255) PRIMARY KEY,
scope varchar(255),
value json
);
Add a unique constraing
ALTER TABLE states ADD CONSTRAINT states_scope_key_unique UNIQUE (scope, key);
postgres://postgres:mysecretpassword@localhost:5433/postgres