1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2026-03-02 03:49:30 +00:00

User_wikis: Add database table

This commit is contained in:
gnosygnu
2016-10-25 10:46:56 -04:00
parent b4e89a47c2
commit 1f7a54c1e6
4 changed files with 110 additions and 53 deletions

View File

@@ -39,59 +39,6 @@ class Xou_wiki_itm_source {
class Xou_wiki_itm_path_layout {
public static final int Tid_multiple = 1, Tid_root = 2;
}
class Xou_wiki_tbl {
public static final String Tbl_sql = String_.Concat_lines_nl
( "CREATE TABLE wiki_regy"
, "( wiki_id integer NOT NULL PRIMARY KEY" // user_generated;
, ", wiki_key varchar(255)" // unique; akin to domain; en.wikipedia.org
, ", wiki_source integer" // 0=user; 1=wmf; 2=wikia;
, ", wiki_ctg_type integer" //
, ", wiki_search_type integer" //
// , ", wiki_data_date varchar(8)" // 20140502
// , ", wiki_data_root varchar(255)" //
// , ", wiki_file_date varchar(8)" // 20140502
// , ", wiki_file_root varchar(255)" //
// , ", wiki_html_date varchar(8)" // 20140502
// , ", wiki_html_root varchar(255)" //
, ", wiki_misc varchar(255)" // 20140502
, ");"
);
public static final String Tbl_name = "user_wiki"
, Fld_dir_id = "dir_id", Fld_dir_name = "dir_name"
;
// private static final Db_idx_itm
// Idx_name = Db_idx_itm.sql_("CREATE INDEX IF NOT EXISTS cache_dir__name ON cache_dir (dir_name);")
// ;
}
/*
( wf_id integer NOT NULL PRIMARY KEY -- 1,2,3, etc..; user-specified (not canonical)
, wf_key varchar(255) NOT NULL -- system key; EX: "enwiki.css.20140601" UNIQUE; SYSTEM-GENERATED; CUSTOMIZABLE
, wf_name varchar(255) NOT NULL -- ui name; EX: "English Wikipedia CSS as of 2014-06-01"; NOT UNIQUE; SYSTEM-GENERATED; CUSTOMIZABLE
, wf_data_domain varchar(255) NOT NULL -- domain; EX:en.wikipedia.org
, wf_data_date varchar(255) NOT NULL -- dump date; 20140502
, wf_data_source varchar(255) NOT NULL -- WMF;archive.org;XOWA;
, wf_url varchar(255) NOT NULL -- url location; EX: "xowa-fs://~{xowa}/wiki/en.wikipedia.org/en.wikipedia.org.xowa"
, wf_sort integer NOT NULL -- sort order; EX: "1", "2", "3", etc.. UNIQUE; SYSTEM-GENERATED; CUSTOMIZABLE
, wf_deleted integer NOT NULL -- deleted flag
/xowa
/bin
/data
/en.wikipedia.org
/ file
fasb.mount
/ fsdb.main
/ fsdb.user
/ html
xowa_common.css
xowa_wiki.css
/ imgs
/ wiki
en.wikipedia.org.xowa
en.wikipedia.org.000.xowa
/user
*/
class Xou_wiki_part {
public int Id() {return id;} public void Id_(int v) {id = v;} private int id;
public boolean Deleted() {return deleted;} public void Deleted_(boolean v) {deleted = v;} private boolean deleted;