Skip to end of metadata
Go to start of metadata
You are viewing an old version of this page. View the current version. Compare with Current  |   View Page History

<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[

Zend Framework: Zend_Db_Schema Component Proposal

Proposed Component Name Zend_Db_Schema
Developer Notes http://framework.zend.com/wiki/display/ZFDEV/Zend_Db_Schema
Proposers Maksym Sliesarenko
Zend Liaison TBD
Revision 1.0 - 13 May 2012: Initial Draft. (wiki revision: 13)

Table of Contents

1. Overview

Zend_Db_Schema is a simple component that allows you to manage your db entity's schema

2. References

3. Component Requirements, Constraints, and Acceptance Criteria

  • This component will provide ability to alter database entities.
  • This component will provide ability to represent database entities as php objects.

4. Dependencies on Other Framework Components

  • Zend_Db
  • Zend_Validate
  • Zend_Filter
  • Zend_Tool

5. Theory of Operation

The component is instantiated with a mind-link that ...

6. Milestones / Tasks

Describe some intermediate state of this component in terms of design notes, additional material added to this page, and / code. Note any significant dependencies here, such as, "Milestone #3 can not be completed until feature Foo has been added to ZF component XYZ." Milestones will be required for acceptance of future proposals. They are not hard, and many times you will only need to think of the first three below.

  • Milestone 1: design notes will be published here
  • Milestone 2: Working prototype checked into the incubator supporting use cases #1, #2, ...
  • Milestone 3: Working prototype checked into the incubator supporting use cases #3 and #4.
  • Milestone 4: Unit tests exist, work, and are checked into SVN.
  • Milestone 5: Initial documentation exists.

If a milestone is already done, begin the description with "[DONE]", like this:

  • Milestone #: [DONE] Unit tests ...

7. Class Index

Zend_Db_Migration_Change
Zend_Db_Migration_Exception
Zend_Db_Migration_Manager
Zend_Db_Migration_Skeleton
Zend_Db_Schema_AbstractEntity
Zend_Db_Schema_AbstractSchema
Zend_Db_Schema_Database
Zend_Db_Schema_Exception
Zend_Db_Schema_Generator_Interface
Zend_Db_Schema_Generator_Mysql
Zend_Db_Schema_Loader_Interface
Zend_Db_Schema_Loader_Mysql
Zend_Db_Schema_Table
Zend_Db_Schema_Table_AbstractDefinition
Zend_Db_Schema_Table_Column
Zend_Db_Schema_Table_DefinitionManager_AbstractManager
Zend_Db_Schema_Table_DefinitionManager_Column
Zend_Db_Schema_Table_DefinitionManager_ForeignKey
Zend_Db_Schema_Table_DefinitionManager_Index
Zend_Db_Schema_Table_ForeignKey
Zend_Db_Schema_Table_Index
Zend_Db_Schema_Table_PrimaryKey
Zend_Tool_Project_Context_Migration_Directory
Zend_Tool_Project_Context_Migration_File
Zend_Tool_Project_Context_Schema_Directory
Zend_Tool_Project_Context_Schema_File
Zend_Tool_Project_Provider_Migration
Zend_Tool_Project_Provider_Schema
Zend_Validate_Db_Schema_AbstractDatabase
Zend_Validate_Db_Schema_AbstractTable
Zend_Validate_Db_Schema_Chain
Zend_Validate_Db_Schema_Database_Mysql_Charset
Zend_Validate_Db_Schema_Database_Mysql_Name
Zend_Validate_Db_Schema_Database_MysqlDatabase
Zend_Validate_Db_Schema_Table_Mysql_Column
Zend_Validate_Db_Schema_Table_Mysql_Column_Name
Zend_Validate_Db_Schema_Table_Mysql_Column_Type
Zend_Validate_Db_Schema_Table_Mysql_Engine
Zend_Validate_Db_Schema_Table_Mysql_Index_Name
Zend_Validate_Db_Schema_Table_Mysql_Index_Type
Zend_Validate_Db_Schema_Table_Mysql_Name
Zend_Validate_Db_Schema_Table_MysqlTable

8. Use Cases

UC-01

Zend_Loader_Autoloader::getInstance()->registerNamespace('ZendDbSchema');

$table= new ZendDbSchema_Db_Schema_Table('users');

$table->engine = 'myisam'; //change param
$table->save();

$table->toArray(); //export to array
$table->toSql(); //export to sql (CREATE statement)
$table->toSql(true); //export to sql (ALTER statement)

$database= new ZendDbSchema_Db_Schema_Database('test');
$database->__toString();// alias for toSql method

9. Class Skeletons

]]></ac:plain-text-body></ac:macro>

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.