Skip to content

Instantly share code, notes, and snippets.

View zkvarz's full-sized avatar

Kirill Varivoda zkvarz

  • 31-А Universytetska St, Kherson, UTC+3
View GitHub Profile
@zkvarz
zkvarz / gist:abbd5a4943037985fd9e40fd71dd34c1
Created October 8, 2021 08:52
PostgreSQL table relationships examples
DROP schema IF EXISTS anime cascade; --USE ONLY IN PRE-PROD ENVIRONMENTS
DROP schema IF EXISTS audio cascade; --USE ONLY IN PRE-PROD ENVIRONMENTS
DROP schema IF EXISTS persons cascade; --USE ONLY IN PRE-PROD ENVIRONMENTS
DROP schema IF EXISTS students cascade; --USE ONLY IN PRE-PROD ENVIRONMENTS
create schema anime;
create table anime.anime
(
id serial not null,