Sha256: 0d4790e709a2e690f0c006417ec23aabd4528f52111a9f07edf2859a3f50afad
Contents?: true
Size: 1.41 KB
Versions: 16
Compression:
Stored size: 1.41 KB
Contents
\connect postgres drop database if exists fox; create database fox; \connect fox create unlogged table roles ( id integer generated by default as identity primary key, name text not null, active boolean not null default true ); create unlogged table pictures ( id integer generated by default as identity primary key, title text not null, blob text not null ); create unlogged table users ( id integer generated by default as identity primary key, name text not null, age integer, groups varchar[], role_id integer not null references roles(id), picture_id integer unique references pictures(id) ); create unlogged table blogs ( id integer generated by default as identity primary key, user_id integer not null references users(id), title text not null ); create unlogged table posts ( id integer generated by default as identity primary key, blog_id integer not null references blogs(id), head text not null, body text not null, created_at timestamp without time zone default (now() at time zone 'UTC') ); create unlogged table comments ( id integer generated by default as identity primary key, post_id integer not null references posts(id), author_id integer not null references users(id), head text not null, body text not null, created_at timestamp without time zone default (now() at time zone 'UTC') ); alter table users add column last_post_id integer references posts(id);
Version data entries
16 entries across 16 versions & 1 rubygems