Closed (fixed)
Project:
OG Files
Version:
5.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 Jan 2008 at 17:10 UTC
Updated:
31 May 2008 at 15:31 UTC
I tried to use this on a brand new install and found that the database table was not created when I installed, causing several sql errors to be tossed up. I also don't see anything in the code that suggests exactly what the table should look like.
Comments
Comment #1
Josiah@missions.ritchietribe.net commentedoh, I found where this gets built, and see a comment that you know it isn't working. Maybe a comment could be made on the project page to let people know until its fixed? You could also mention that the SQL command "CREATE TABLE og_files (gid INT NOT NULL, data TEXT NOT NULL);" will take care of it until then. I did that and things seem to be functioning as expected.
function og_files_install() {
//seems to be not working
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
db_query("CREATE TABLE {og_files} (
gid INT NOT NULL,
data TEXT NOT NULL
);"
);
break;
}
}
Comment #2
nath commentedThe way it is done in this module is wrong. The og_files_install function should be in a og_files.install file, not in the module file itself.
Comment #3
cwittusen commentedJosiah:
I tried to break out the install function to its own install file with the modification as you documented but I still get the same problem about the table not existing. what might I be doing wrong?
Here is what I put in og_files.install
<?php
function og_files_install() {
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
db_query("CREATE TABLE og_files (gid INT NOT NULL, data TEXT NOT NULL);");
break;
}
}
Comment #4
pivica commentedPlease read http://drupal.org/node/212572 and especially take a look to http://drupal.org/node/212572#comment-730037 for a patched version of module.
Comment #5
pivica commentedFixed with http://drupal.org/cvs?commit=116697
Comment #6
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.