Ticket #280 (assigned defect)

Opened 1 year ago

Last modified 1 year ago

Installer cannot handle a column named "attributes"

Reported by: Oliver Assigned to: bermi (accepted)
Priority: minor Milestone: 1.3.0
Component: Installer Keywords: column table database install
Cc:

Description

Issue

When using a custom column named "attributes" in an installer, the migration-script fails.

Example

<?php
class SettingInstaller extends AkInstaller
{	
	function up_1()
	{
		$this->createTable('settings', "
			id,
			attributes
		");
	}
	
	function down_1()
	{
		$this->dropTable('settings');
	}
}
?>

Installing using

./script/migrate settings install

Fails with

-----
(mysqlt): SHOW TABLES
-----
-----
(mysqlt): SELECT version FROM akelos_migrations WHERE name='settings'
-----

[settings] Upgrading to version 1-----
(mysqlt): SET AUTOCOMMIT=0
-----
-----
(mysqlt): BEGIN
-----
-----
(mysqlt): SHOW TABLES
-----
-----
(mysqlt): SHOW COLUMNS FROM ak_active_records
-----
1146: Table 'database.ak_active_records' doesn't exist

Change History

05/18/10 06:02:36 changed by bermi

  • owner set to bermi.
  • status changed from new to assigned.

I guess it's due the fact that Akelos Active Records implement a getAttributes() method and it produces some king of clash.

For Akelos 2 one of my goals is removing all possible naming conflicts like "attributes", "model" and "type"