I would like to build an application on top of the following schema,
but,
of course, it would be preferable to make the schema compatible with the
rails naming conventions so that things work as smoothly as possible
The current schema for straw:
85 dbSql = []
86
87 dbSql.append(βββ
88 CREATE TABLE IF NOT EXISTS feeds (
89 id INTEGER PRIMARY KEY,
90 title TEXT,
91 location VARCHAR(255),
92 category_id INTEGER
93 );βββ);
94
95 dbSql.append(βββ
96 CREATE TABLE IF NOT EXISTS items (
97 id INTEGER PRIMARY KEY,
98 title TEXT NOT NULL,
99 feed_id INTEGER NOT NULL,
100 is_read INTEGER NOT NULL DEFAULT 0,
101 link TEXT NOT NULL,
102 pub_date TIMESTAMP NOT NULL,
103 description TEXT NOT NULL
104 );βββ)
105
106 dbSql.append(βββ
107 CREATE TABLE IF NOT EXISTS categories (
108 id INTEGER PRIMARY KEY,
109 parent_id INTEGER,
110 title TEXT
111 );βββ)
112
113 dbSql.append(βββINSERT INTO categories (parent_id, title) VALUES
(NULL, βrootβ);βββ)
114
115 dbSql.append(βββ
116 CREATE TABLE IF NOT EXISTS treeview_nodes (
117 id INTEGER PRIMARY KEY,
118 obj_id INTEGER NOT NULL,
119 norder INTEGER NOT NULL,
120 type VARCHAR(1) NOT NULL
121 );βββ)
<http://repo.or.cz/w/straw/fork.git?a=blob;f=straw/storage/
SQLiteStorage.py;h=aeb1fc418c162bdc082d8bcc7dbc6a8e1af9b2a5;hb=dfaf7eb7f1206746a2d8d43be0e81ed396ef711c>
I donβt really have enough knowledge as to what specific changes to
propose. The tables look to be plurals, which is good, I know.
According to <http://wiki.rubyonrails.org/rails/pages/
TipSheetForBeginners> this is pretty much the only schema requirement.
Would this qualify as a legacy database? If so, why and what can be
done
to change that?
thanks,
Thufir