refactor: Rename column to use snake_case for consistency, also added ext repos table for later

This commit is contained in:
Ahmad Ansori Palembani 2024-06-04 07:02:45 +07:00
parent e15bc047fe
commit d769195eae
Signed by: null2264
GPG key ID: BA64F8B60AF3EFB6
5 changed files with 20 additions and 3 deletions

View file

@ -42,7 +42,7 @@ object MangaTable {
const val COL_CATEGORY = "category"
const val COL_HIDE_TITLE = "hideTitle"
const val COL_HIDE_TITLE = "hide_title"
const val COL_DATE_ADDED = "date_added"

View file

@ -0,0 +1,7 @@
CREATE TABLE extension_repos (
base_url TEXT NOT NULL PRIMARY KEY,
name TEXT NOT NULL,
short_name TEXT,
website TEXT NOT NULL,
signing_key_fingerprint TEXT UNIQUE NOT NULL
);

View file

@ -16,7 +16,7 @@ CREATE TABLE mangas(
last_update INTEGER AS Long,
initialized INTEGER AS Boolean NOT NULL,
viewer INTEGER NOT NULL,
hideTitle INTEGER NOT NULL,
hide_title INTEGER NOT NULL,
chapter_flags INTEGER NOT NULL,
date_added INTEGER AS Long,
filtered_scanlators TEXT,

View file

@ -23,7 +23,7 @@ CREATE TABLE manga_sync(
);
INSERT INTO manga_sync(_id, manga_id, sync_id, remote_id, library_id, title, last_chapter_read, total_chapters, status, score, remote_url, start_date, finish_date)
SELECT _id,manga_id, sync_id, remote_id, library_id, title, last_chapter_read, total_chapters, status, score, remote_url, start_date, finish_date
SELECT _id, manga_id, sync_id, remote_id, library_id, title, last_chapter_read, total_chapters, status, score, remote_url, start_date, finish_date
FROM manga_sync_tmp;
DROP TABLE manga_sync_tmp;

View file

@ -0,0 +1,10 @@
CREATE TABLE extension_repos (
base_url TEXT NOT NULL PRIMARY KEY,
name TEXT NOT NULL,
short_name TEXT,
website TEXT NOT NULL,
signing_key_fingerprint TEXT UNIQUE NOT NULL
);
ALTER TABLE mangas
RENAME COLUMN hideTitle TO hide_title;