Skip to content

Instantly share code, notes, and snippets.

View chrisbull's full-sized avatar

Chris Bull chrisbull

View GitHub Profile
@chrisbull
chrisbull / schema.prisma
Last active February 23, 2022 16:06
schema.prisma
//
// Code Instructions
// 1. Table names Should be TitleCased and Singular
// 2. Tables should have map to table with snake_case and pluraliszed
// 3. Most tables should have id, createdAt, updatedAt, deletedAt (unless special reasoning)
// 4. All variables should be camelCase with maps to the database in snake_case
// 5. Except when array mapped items that should not have relationships upstream: ie Reactions => Posts
//
datasource db {
version: "3.7"
services:
postgres:
container_name: postgres
ports:
- "5432:5432"
image: postgres:latest
restart: always
volumes:
- postgres:/var/lib/postgresql/data
root = true
[*]
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true