sqlite: fix columns like subreddit name to be case insensitive
This commit is contained in:
parent
c3ba228130
commit
e7473563ac
|
@ -1,7 +1,7 @@
|
||||||
-- +goose Up
|
-- +goose Up
|
||||||
-- +goose StatementBegin
|
-- +goose StatementBegin
|
||||||
CREATE TABLE subreddits (
|
CREATE TABLE subreddits (
|
||||||
name VARCHAR(30) NOT NULL PRIMARY KEY,
|
name VARCHAR(30) NOT NULL PRIMARY KEY COLLATE NOCASE,
|
||||||
enable_schedule INT NOT NULL DEFAULT 1,
|
enable_schedule INT NOT NULL DEFAULT 1,
|
||||||
subtype INT NOT NULL DEFAULT 0,
|
subtype INT NOT NULL DEFAULT 0,
|
||||||
schedule VARCHAR(20) NOT NULL DEFAULT '@daily',
|
schedule VARCHAR(20) NOT NULL DEFAULT '@daily',
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
-- +goose Up
|
-- +goose Up
|
||||||
-- +goose StatementBegin
|
-- +goose StatementBegin
|
||||||
CREATE TABLE devices(
|
CREATE TABLE devices(
|
||||||
slug VARCHAR(255) NOT NULL PRIMARY KEY,
|
slug VARCHAR(255) NOT NULL PRIMARY KEY COLLATE NOCASE,
|
||||||
enable INTEGER NOT NULL DEFAULT 1,
|
enable INTEGER NOT NULL DEFAULT 1,
|
||||||
name VARCHAR(255) NOT NULL,
|
name VARCHAR(255) NOT NULL COLLATE NOCASE,
|
||||||
resolution_x DOUBLE NOT NULL,
|
resolution_x DOUBLE NOT NULL,
|
||||||
resolution_y DOUBLE NOT NULL,
|
resolution_y DOUBLE NOT NULL,
|
||||||
aspect_ratio_tolerance DOUBLE NOT NULL default 0.2,
|
aspect_ratio_tolerance DOUBLE NOT NULL default 0.2,
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
-- +goose StatementBegin
|
-- +goose StatementBegin
|
||||||
CREATE TABLE images(
|
CREATE TABLE images(
|
||||||
id INTEGER PRIMARY KEY,
|
id INTEGER PRIMARY KEY,
|
||||||
subreddit VARCHAR(255) NOT NULL,
|
subreddit VARCHAR(255) NOT NULL COLLATE NOCASE,
|
||||||
device VARCHAR(250) NOT NULL,
|
device VARCHAR(250) NOT NULL COLLATE NOCASE,
|
||||||
post_title VARCHAR(255) NOT NULL,
|
post_title VARCHAR(255) NOT NULL,
|
||||||
post_name VARCHAR(255) NOT NULL,
|
post_name VARCHAR(255) NOT NULL,
|
||||||
post_url VARCHAR(255) NOT NULL,
|
post_url VARCHAR(255) NOT NULL,
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
-- +goose StatementBegin
|
-- +goose StatementBegin
|
||||||
CREATE TABLE schedule_status(
|
CREATE TABLE schedule_status(
|
||||||
id INTEGER PRIMARY KEY,
|
id INTEGER PRIMARY KEY,
|
||||||
subreddit VARCHAR(255) NOT NULL,
|
subreddit VARCHAR(255) NOT NULL COLLATE NOCASE,
|
||||||
status TINYINT NOT NULL DEFAULT 0,
|
status TINYINT NOT NULL DEFAULT 0,
|
||||||
error_message VARCHAR(255) NOT NULL DEFAULT '',
|
error_message VARCHAR(255) NOT NULL DEFAULT '',
|
||||||
created_at BIGINT DEFAULT 0 NOT NULL,
|
created_at BIGINT DEFAULT 0 NOT NULL,
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
-- +goose StatementBegin
|
-- +goose StatementBegin
|
||||||
CREATE TABLE schedule_histories(
|
CREATE TABLE schedule_histories(
|
||||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||||
subreddit VARCHAR(255) NOT NULL,
|
subreddit VARCHAR(255) NOT NULL COLLATE NOCASE,
|
||||||
status TINYINT NOT NULL DEFAULT 0,
|
status TINYINT NOT NULL DEFAULT 0,
|
||||||
error_message VARCHAR(255) NOT NULL DEFAULT '',
|
error_message VARCHAR(255) NOT NULL DEFAULT '',
|
||||||
created_at BIGINT DEFAULT 0 NOT NULL,
|
created_at BIGINT DEFAULT 0 NOT NULL,
|
||||||
|
|
Loading…
Reference in a new issue