dibs 0.2.0-rc.1

Postgres toolkit for Rust, powered by facet reflection
Documentation
---
source: crates/dibs/src/diff.rs
expression: diff.to_sql()
---
-- Table: post_likes
CREATE TABLE "post_likes" (
    "user_id" BIGINT NOT NULL,
    "post_id" BIGINT NOT NULL,
    PRIMARY KEY ("user_id", "post_id")
);
ALTER TABLE "post_likes" ADD CONSTRAINT "post_likes_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "users" ("id");
ALTER TABLE "post_likes" ADD CONSTRAINT "post_likes_post_id_fkey" FOREIGN KEY ("post_id") REFERENCES "posts" ("id");

-- Table: posts
CREATE TABLE "posts" (
    "id" BIGINT PRIMARY KEY,
    "author_id" BIGINT NOT NULL,
    "title" TEXT NOT NULL
);
ALTER TABLE "posts" ADD CONSTRAINT "posts_author_id_fkey" FOREIGN KEY ("author_id") REFERENCES "users" ("id");

-- Table: users
CREATE TABLE "users" (
    "id" BIGINT PRIMARY KEY,
    "email" TEXT NOT NULL UNIQUE,
    "name" TEXT NOT NULL
);