#6147: Add ability to ALTER columns into primary key fields with CakeSchema
-----------------------------+----------------------------------------------
    Reporter:  chrisbdaemon  |         Owner:         
        Type:  Bug           |        Status:  new    
    Priority:  Medium        |     Milestone:  1.3.x.x
   Component:  PostgreSQL    |       Version:         
    Severity:  Normal        |    Resolution:         
    Keywords:                |   Php_version:  PHP 5  
Cake_version:  1.2.1.8004    |  
-----------------------------+----------------------------------------------
Changes (by mark_story):

  * owner:  mark_story =>
  * status:  assigned => new
  * summary:  Using console script to update a Postgres database fails with
              syntax error => Add ability to ALTER columns
              into primary key fields with CakeSchema
  * version:  1.2 Final =>
  * milestone:  1.2.x.x => 1.3.x.x

Comment:

 After looking into how things are currently working, transforming a column
 into a primary key is not supported.  It differs quite a bit from regular
 column alter syntax, and in the case of postgres its 2 separate queries
 that need to be performed.  Simply doing {{{ALTER TABLE "posts" ALTER
 COLUMN "id" TYPE SERIAL}}} will not work.  A separate serial index needs
 to be created and the nextval() set as default.  This was out of scope for
 the original implementation.  But is something we are looking at for the
 future.  So this will be moved to an enhancement.

-- 
Ticket URL: <https://trac.cakephp.org/ticket/6147#comment:4>
CakePHP : The Rapid Development Framework for PHP <https://trac.cakephp.org/>
Cake is a rapid development framework for PHP which uses commonly known design 
patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC. 
Our primary goal is to provide a structured framework that enables PHP users at 
all levels to rapidly develop robust web applications, without any loss to 
flexibility.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"tickets cakephp" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/tickets-cakephp?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to