5

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?

Bjorn
  • 133
  • 1
  • 7
  • 1
    What database engine are you using? One thing you could do is to look into turning off case-sensitivity with column names. Still, that rather begs the question as to how the upper case ones were generated in Propel to start with - under what version of Propel were the files generated originally? – halfer Oct 08 '13 at 14:08
  • Thanks halfer. I am using MySQL with MyISAM. I've managed to downgrade my propel_generate to version 1.6.1 and phing to 2.3.3 to sort this out eventually. Now the files generate like they used to. What a mission. – Bjorn Oct 09 '13 at 11:10
  • Great! If you wouldn't mind reverting your addendum edit, and adding that as an answer, that will mark it as solved. – halfer Oct 09 '13 at 12:08
  • Incidentally, do you regard this situation in Propel as a non-deliberate change of behaviour? If so, I'd be inclined to recommend raising a bug ticket with the project. I should think the 1.6 branch will be maintained for a year or two after the release of Propel 2, which currently is only in alpha release. Thus, I reckon they'd want to fix it. – halfer Oct 09 '13 at 12:10

1 Answers1

1

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.

Bjorn
  • 133
  • 1
  • 7