Skip to content

Commit c7b2fc2

Browse files
committed
Issue #10: Database Setup
- Create user database migration
1 parent f1ccf3a commit c7b2fc2

File tree

4 files changed

+17
-0
lines changed

4 files changed

+17
-0
lines changed

Database/deploy/user.sql

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CREATE TABLE users (
2+
id SERIAL PRIMARY KEY,
3+
email varchar(64) not null,
4+
passwordhash varchar(64) not null,
5+
bio varchar(1000),
6+
imagelink varchar(512),
7+
admin boolean default FALSE
8+
);

Database/revert/user.sql

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
DROP TABLE users;

Database/sqitch.plan

+1
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
%project=node-boilerplate
33
%uri=https://github.com/codebru/node-boilerplate
44

5+
user 2019-07-23T13:10:32Z Philip,,, <philip@buntbook> # Create user table.

Database/verify/user.sql

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
-- Verify node-boilerplate:user on pg
2+
3+
BEGIN;
4+
5+
-- XXX Add verifications here.
6+
7+
ROLLBACK;

0 commit comments

Comments
 (0)