Hey everyone, I'm in a little situation.
So, I'm making this shoutbox with ruby, and I want a way to easily display the time of the post by the users.. so I used timestamp.
Heres the table I used:
sqlite> create table shouts
...> (id INT NOT NULL ,
...> postdate timestamp(14) ,
...> name VARCHAR( 20 ) NOT NULL ,
...> description VARCHAR( 200 ) NOT NULL ,
...> PRIMARY KEY ( id )
In my application controller, I have the scaffold method. When I try to create new entries, I get this error:
shouts.id may not be NULL: INSERT INTO shouts ('name', 'postdate', 'description') VALUES('adf', NULL, 'adf')
Is there a simple way to fix this? Thank you for your time.