Skip to content

Commit

Permalink
Fix index table name for fimfic stats
Browse files Browse the repository at this point in the history
  • Loading branch information
SilkRose committed Mar 9, 2024
1 parent 1c3b0e6 commit decfc02
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion fimficstats/fimfic-stats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import * as plib from "./lib.ts";
import fs from "fs";

const db = new Database("./fimfic-stats.db", { create: true });
db.prepare(sql.index_table).run();
db.prepare(sql.story_index_table).run();
db.prepare(sql.authors_table).run();
db.prepare(sql.stories_table).run();
db.prepare(sql.tags_table).run();
Expand Down
4 changes: 2 additions & 2 deletions fimficstats/sql-patterns.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const index_table = `CREATE TABLE IF NOT EXISTS Index (
export const story_index_table = `CREATE TABLE IF NOT EXISTS Story_index (
story_id integer PRIMARY KEY,
status text NOT NULL,
version integer NOT NULL,
Expand Down Expand Up @@ -35,7 +35,7 @@ export const stories_table = `CREATE TABLE IF NOT EXISTS Stories (
REFERENCES Authors (id),
CONSTRAINT story_index_id_fk FOREIGN KEY (id)
REFERENCES Index (story_id)
REFERENCES story_index (story_id)
)`;

export const tags_table = `CREATE TABLE IF NOT EXISTS Tags (
Expand Down

0 comments on commit decfc02

Please sign in to comment.