When I installed version 1.0.1 and I got following error:
---Adding notice source data to database...
---ERROR (DB Error: unknown error) for SQL 'INSERT INTO notice_source
---.......
---Can't run 0 script.
My database is MySQL.
I got some clue. This should be script bug.
This is table notice_source schem
public static function schemaDef()
{
return array(
'fields' => array(
'code' => array('type' => 'varchar', 'length' => 32, 'not null' => true, 'description' => 'source code'),
'name' => array('type' => 'varchar', 'length' => 255, 'not null' => true, 'description' => 'name of the source'),
'url' => array('type' => 'varchar', 'length' => 255, 'not null' => true, 'description' => 'url to link to'),
'notice_id' => array('type' => 'int', 'not null' => true, 'description' => 'date this record was created'),
'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
),
'primary key' => array('code'),
);
}
There is a field name "notice_id"
but in notice_source.sql file insert command like this
INSERT INTO notice_source
(code, name, url, created)
VALUES
here missing "notice_id" value
Real error in mysql is :
#1364 - Field 'notice_id' doesn't have a default value
Comments
Any solution?
You can try here: http://forum.status.net/discussion/comment/8843#Comment_8843
Seems your DB scheme is not up-to-date.
Regards,
I think DB scheme is up-to-date. The 'notice_id' is new field in version 1.0.1.
The problem is \db\notice_source.sql file use old schema no 'notice_id ' field.
should like this
INSERT INTO notice_source
(code, name, url, notice_id, created)
VALUES
I means \db\notice_source.sql file need to be updated.
If yes, that's strange, I updated my test instance some days ago with 1.0.1 without any problem.
ERROR (DB Error: unknown error) for SQL 'INSERT INTO notice_source (code, name, url, created) VALUES ('adium', 'Adium', 'http://www.adiumx.com/', now()), ('Afficheur', 'Afficheur', 'http://afficheur.sourceforge.jp/', now()) ...
Anyone an idea how to solve that?
It is a fresh installation. I deleted all and re-upload, still no luck. And I am using the latest version of MySQL and PHP.
I also updated db schema, as suggested by nus_intel
INSERT INTO notice_source
(code, name, url, notice_id, created)
VALUES
I installed this program in the past with no problem, but no luck using the stable and development copy.
I hope this help me troubleshoot this install problem.
Thanks in advance,
EM