./symfony propel-build-model
./symfony propel-build-sql
but problem still exists.
This is problem with postgresql, because if i choose:
propel.database = mysql
after build-sql i have:
DROP TABLE IF EXISTS `configuration`;
CREATE TABLE `configuration`
(
`id` INTEGER NOT NULL AUTO_INCREMENT,
`name` VARCHAR(255) NOT NULL,
So, what is wrong with pgsql?
Thx!
Rafał
2009/2/25 Tom Haskins-Vaughan <[email protected]>
>
> You have to rebuild your model first then rebuild the sql.
>
> RaV wrote:
> > Doesn't work :(
> >
> > portal_user:
> > _attributes: { phpName: PortalUser }
> > id: ~
> >
> > But after: ./symfony propel-build-sql
> >
> > I have file data/sql\lib.model.schema.sql:
> >
> -----------------------------------------------------------------------------
> > -- portal_user
> >
> -----------------------------------------------------------------------------
> >
> > DROP TABLE "portal_user" CASCADE;
> >
> >
> > CREATE TABLE "portal_user"
> > (
> > "id" INTEGER NOT NULL,
> > "login" VARCHAR(255) NOT NULL,
> > "password" VARCHAR(255) NOT NULL,
> >
> > What have i done wrong?
> >
> > Rafał
> >
> > 2009/2/25 Tom Haskins-Vaughan <[email protected]
> > <mailto:[email protected]>>
> >
> >
> > I'm not sure, but try giving it NULL attibutes with ~:
> >
> > ...
> > portal_user:
> > _attributes: { phpName: PortalUser }
> > id: ~
> > ...
> >
> > Hope this helps.
> >
> > Tom
> >
> >
> > RaV wrote:
> > > How to make id autoincremental ? I thought that symfony did it
> > for me.
> > >
> > > Piece of schema.yml file:
> > > ...
> > > portal_user:
> > > _attributes: { phpName: PortalUser }
> > > id:
> > > login: { type: varchar(255), required: true }
> > > password: { type: varchar(255), required: true }
> > > ...
> > >
> > >
> > > Rafał
> > >
> > > On Tue, Feb 24, 2009 at 7:31 PM, Andy Dziahel'
> > <[email protected] <mailto:[email protected]>
> > > <mailto:[email protected] <mailto:[email protected]>>>
> > wrote:
> > >
> > > Hi.
> > >
> > > Looks like you just forgot to make `portal_user`.`id`
> > autoincremented.
> > >
> > >
> > > On Tue, Feb 24, 2009 at 19:02, RaV <[email protected]
> > <mailto:[email protected]>
> > > <mailto:[email protected] <mailto:[email protected]>>> wrote:
> > >
> > > Hi!
> > >
> > > I have a problem with propel-load-data.
> > > I wrote my fixture:
> > >
> > > data/fixtures/data.yml:
> > >
> > > PortalUser:
> > > portuser_1:
> > > login: login
> > > password: adf
> > > name: Rafal
> > > surname: Beeee
> > > created_at: 2008-12-26
> > > updated_at: 2008-12-26
> > > email: [email protected]
> > > is_admin: true
> > > created_at: 2008-12-11
> > > updated_at: 2008-12-11
> > > Configuration:
> > > configuration_0:
> > > name: LOG_DELAY
> > > value: 5
> > > comment: 'sdf'
> > > updated_at: 2009-01-26
> > >
> > > But when i was trying to load this into database, i saw
> > the message:
> > > Unable to execute INSERT statement. [wrapped: Could not
> > > execute update [Native Error: ERROR: null value in
> > column "id"
> > > violates not-null constraint] [User Info: INSERT INTO
> > > portal_user
> > >
> > (LOGIN,PASSWORD,NAME,SURNAME,EMAIL,IS_ADMIN,CREATED_AT,UPDATED_AT)
> > > VALUES
> > >
> > ('login','adf','Rafal','Beeee','[email protected]','t','2008-12-11
> > > 00:00:00 +0100','2008-12-11 00:00:00 +0100')]]
> > >
> > > I was wondering why my symfony didn't set id
> automatically.
> > > Should I have to write it in my fixture?
> > >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---