Skip to content

Commit

Permalink
fix sqlite build by adding the required migration (#25)
Browse files Browse the repository at this point in the history
* fix sqlite build by adding the required migration

* formatting
  • Loading branch information
ulucs authored Jun 29, 2024
1 parent c09c310 commit 51700e2
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions examples/blog/migrations/20230701234331_blog.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
CREATE TABLE user (
id INT PRIMARY KEY,
name TEXT NOT NULL UNIQUE,
email TEXT NOT NULL UNIQUE
);

CREATE TABLE post (
id INT PRIMARY KEY,
author INT REFERENCES user(id) ON DELETE CASCADE,
title TEXT NOT NULL UNIQUE,
created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,
deleted_at TIMESTAMPTZ
);

0 comments on commit 51700e2

Please sign in to comment.