Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions internal/database/migrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ var migrations = [...]func(tx *sql.Tx) error{
);

CREATE TABLE users (
id serial not null,
id SERIAL,
username text not null unique,
password text,
is_admin bool default 'f',
Expand All @@ -32,7 +32,7 @@ var migrations = [...]func(tx *sql.Tx) error{
);

CREATE TABLE sessions (
id serial not null,
id SERIAL,
user_id int not null,
token text not null unique,
created_at timestamp with time zone default now(),
Expand All @@ -44,7 +44,7 @@ var migrations = [...]func(tx *sql.Tx) error{
);

CREATE TABLE categories (
id serial not null,
id SERIAL,
user_id int not null,
title text not null,
primary key (id),
Expand All @@ -53,7 +53,7 @@ var migrations = [...]func(tx *sql.Tx) error{
);

CREATE TABLE feeds (
id bigserial not null,
id BIGSERIAL,
user_id int not null,
category_id int not null,
title text not null,
Expand All @@ -73,7 +73,7 @@ var migrations = [...]func(tx *sql.Tx) error{
CREATE TYPE entry_status as enum('unread', 'read', 'removed');

CREATE TABLE entries (
id bigserial not null,
id BIGSERIAL,
user_id int not null,
feed_id bigint not null,
hash text not null,
Expand All @@ -92,7 +92,7 @@ var migrations = [...]func(tx *sql.Tx) error{
CREATE INDEX entries_feed_idx on entries using btree(feed_id);

CREATE TABLE enclosures (
id bigserial not null,
id BIGSERIAL,
user_id int not null,
entry_id bigint not null,
url text not null,
Expand All @@ -104,7 +104,7 @@ var migrations = [...]func(tx *sql.Tx) error{
);

CREATE TABLE icons (
id bigserial not null,
id BIGSERIAL,
hash text not null unique,
mime_type text not null,
content bytea not null,
Expand Down Expand Up @@ -334,7 +334,7 @@ var migrations = [...]func(tx *sql.Tx) error{
func(tx *sql.Tx) (err error) {
sql := `
CREATE TABLE api_keys (
id serial not null,
id SERIAL,
user_id int not null references users(id) on delete cascade,
token text not null unique,
description text not null,
Expand Down
Loading