Really useful software project management and source code hosting.    tell me more...
BROWSE: projects / users / groups
Database migrations shell for CakePHP.
create new ticket ticket actions


Really Useful Social coding!

Codaset is an open system, so you can browse and search through all the open source projects, and check out what your friends are coding. Follow them, befriend them, and fork their code; quickly and easily.
Every single open source project you create is free, so come on and use Codaset at no cost. Your first private or semi-private project is also free. Read more about what it costs after that.
#2

Creating a column named "group"   new

0
votes

There seems to be an issue with a migration that has a column named "group"

Here is my migration code:


`UP: add_field:

attachments:
group:

type: string

DOWN:
drop_field:
attachments: group`


And here is the SQL error:


`[1254764276] Add Group To Attachments ...

adding column 'group' on 'attachments'

_doQuery: [Error message: Could not execute statement] [Last executed query: ALTER TABLE attachments ADD group VARCHAR(255) DEFAULT NULL] [Native code: 1064] [Native message: 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 'group VARCHAR(255) DEFAULT NULL' at line 1]`

Joel Moss   made changes 10 months ago
ablemike   left a comment 10 months ago

I was able to get around this by doing this:

UP:
add_field:

attachments:
  groups:
    type: string

DOWN:
drop_field:

attachments: group

UP:
rename_field:

attachments:
  groups: `group`

DOWN:
rename_field:

attachments:
  group: 'groups'

Don't know if this is proper but it seems to work.

   Markdown is supported in tickets and comments.

please let us know who you are

or better still, login here or sign up...

this ticket is currently assigned to Joel Moss

created 10 months ago by ablemike



ticket has

last updated:
10 months ago
by:
status:
new
Priority:
Medium
Type:
Bug



Attachments

No attachments found for this ticket