Install script bug in version 1.0.1

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

  • No body meet this issue?
    Any solution?
  • Hello @nus_intel
    You can try here: http://forum.status.net/discussion/comment/8843#Comment_8843
    Seems your DB scheme is not up-to-date.

    Regards,
  • Thanks jbfavre.

    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.

  • So it's not a fresh install but an update ?
    If yes, that's strange, I updated my test instance some days ago with 1.0.1 without any problem.
  • this is fresh install
  • I have this problem too.... But don't know how to solve it. How about make the notice_id type of serial?
  • I've got the same problem. it occurs while initial database setup at inserting values to table notice_source (statusnet-1.0.1)

    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?
  • I've got the same problem, can't find a solution so I check the forum.
  • @KINGdotNET If this is a fresh installation, I can only suggest you drop the database, rm -rf the StatusNet directory, and start from scratch by creating the db and downloading the archive again. Pay close attention to the required versions (MySQL and PHP) and extensions. I hope this helps.
  • @lnxwalt

    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
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Google Sign In with OpenID