Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dave Griffiths
mongoose-2000
Commits
f186d9bd
Commit
f186d9bd
authored
Feb 02, 2015
by
dave griffiths
Browse files
fix
parent
c713c3e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
eavdb/eavdb.ss
View file @
f186d9bd
...
...
@@ -37,14 +37,7 @@
(
define
(
upgrade-table
db
name
)
(
db-exec
db
(
string-append
"alter table "
name
" add version integer"
))
(
db-exec
db
(
string-append
"create index if not exists index_"
table
"_entity on "
table
"_entity (unique_id)"
))
(
db-exec
db
(
string-append
"create index if not exists index_"
table
"_attribute on "
table
"_attribute (entity_type)"
))
(
db-exec
db
(
string-append
"create index if not exists index_"
table
"_value_varchar on "
table
"_value_varchar (entity_id,attribute_id)"
))
(
db-exec
db
(
string-append
"create index if not exists index_"
table
"_value_int on "
table
"_value_int (entity_id,attribute_id)"
))
(
db-exec
db
(
string-append
"create index if not exists index_"
table
"_value_real on "
table
"_value_real (entity_id,attribute_id)"
))
(
db-exec
db
(
string-append
"create index if not exists index_"
table
"_value_file on "
table
"_value_file (entity_id,attribute_id)"
))
)
(
db-exec
db
(
string-append
"alter table "
name
" add version integer"
)))
;; create eav tables (add types as required)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment