…eeeee’s back!

So, I’m hanging out tonight, got Food Network in the background, and working on this db problem.

As you may recall from the last episode (more than a day ago, but work with me here), I was having issues getting the symfony config to connect to the database. After a few moments of exhaustive research, it looks like my problem was the user password. I….I…I… Naaah, that can’t be! Changed the password anyway, and my error message changed.

Now, the error looks like:

[propel-sql-exec] Failed to execute:

CREATE TABLE `dvd`
(
`type` VARCHAR,
`id` INTEGER NOT NULL AUTO_INCREMENT,
`starring` VARCHAR,
`id_starring` VARCHAR,
PRIMARY KEY (`id`)
)Type=InnoDB
[propel-sql-exec] Could not execute update [Native Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '
`id` INTEGER NOT NULL AUTO_INCREMENT,
`starring` VARCHAR,
`id_starring` VAR' at line 3] [User Info:

CREATE TABLE `dvd`
(
`type` VARCHAR,
`id` INTEGER NOT NULL AUTO_INCREMENT,
`starring` VARCHAR,
`id_starring` VARCHAR,
PRIMARY KEY (`id`)
)Type=InnoDB]
[propel-sql-exec] 3 of 4 SQL statements executed successfully

So, I’m thinking there’s an error somewhere. Likely suspect is the schema.yml file. Since nothing appeared in the db, I’m thinking the unsuccessful statement was the one that actually *does* something. Ugh!

To the schema.yml, Batman!

Ooh! Alton’s on! (anybody who wants to donate a Shun Santoku, leave a message, I’ll send my address……)

I did note an extraneous tilde (“~”) in the schema.yml, but, alas, it didn’t change the output much. Hmm…we’re trying to create the same table twice – that doesn’t look right.

Talked with Quinn (always helpful to make sure my head’s in the right place). He put me on to a great resource – The cheatsheet

So, the schema.xml has changed, again…

propel:
   type:
     id:
     type_name: varchar(15)
   id:
     id:
     dvdname: varchar(128)
     type: varchar(10)
   starring:
     id:
     actor: longvarchar
   id_starring:
     id:
     id_id:
     starring_id:

Did the symfony cc and symfony propel-build-all, no errors! Looked in the dbAdmin side, and there are tables!

Comments are closed.