Dmitriy Pleshevskiy
ec02367680
* feat(core): init migra lib * refac(core): add utils for migration list * feat(core): add managers * refac(core): add batch exec trait * refac(core): smarter managers * refac(cli): removed adapter, builder * refac(cli): use migra core for cli * chore(cli): add dev deps for tests * chore(cli): improve error handling * refac(core): make migrations simpler * refac(cli): change transaction utils * chore(core): add documentation
13 lines
384 B
SQL
13 lines
384 B
SQL
-- Your SQL goes here
|
|
|
|
CREATE TABLE persons (
|
|
id SERIAL PRIMARY KEY,
|
|
email text NOT NULL UNIQUE,
|
|
display_name text NOT NULL,
|
|
created_at timestamp NOT NULL DEFAULT current_timestamp
|
|
);
|
|
|
|
ALTER TABLE articles
|
|
ADD COLUMN author_person_id int NULL
|
|
REFERENCES persons (id) ON UPDATE CASCADE ON DELETE CASCADE;
|