Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Propel how to generate UPPERCASE columns

Tags:

php

propel

I'm updating an old project which uses Propel 1.6

I added the required table to the schema.xml file, and was about to generate when I realised I don't have propel_generate installed.

So I installed propel/propel_generator via pear.

Now when I generated my om, all the generated TableMap files have the column names as lowercase where they were uppercase before:

Before:

$this->addColumn('FIRSTNAME', 'Firstname', 'VARCHAR', true, 255, null);
$this->addColumn('SURNAME', 'Surname', 'VARCHAR', true, 255, null);

Now:

$this->addColumn('firstname', 'Firstname', 'VARCHAR', true, 255, null);
$this->addColumn('surname', 'Surname', 'VARCHAR', true, 255, null);

Does anyone know what I need to change to have it generate uppercase names?

like image 963
Bjorn Avatar asked Nov 11 '22 20:11

Bjorn


1 Answers

After much trial and error, downgrading my propel_generator to version 1.6.1 and my phing to version 2.3.3 reverted it back to UPPERCASE!

As halfer mentioned, I'm not sure if this is a non-deliberate change in behaviour or if there is a config option that requires a change somewhere. I will open a bug ticket on the project.

like image 70
Bjorn Avatar answered Nov 15 '22 00:11

Bjorn