[wp-trac] [WordPress Trac] #9471: Attachments uploaded before post is saved or autosaved get 0 (zero) for post_parent (instead of temp_id value)

WordPress Trac wp-trac at lists.automattic.com
Wed Aug 19 18:52:12 UTC 2009


#9471: Attachments uploaded before post is saved or autosaved get 0 (zero) for
post_parent (instead of temp_id value)
--------------------------+-------------------------------------------------
 Reporter:  aesqe         |       Owner:  scribu                 
     Type:  defect (bug)  |      Status:  accepted               
 Priority:  normal        |   Milestone:  2.8.5                  
Component:  Media         |     Version:  2.8                    
 Severity:  blocker       |    Keywords:  has-patch needs-testing
--------------------------+-------------------------------------------------

Comment(by alxndr):

 Replying to [comment:8 scribu]:
 > I think it would be safer and easier to change the db schema to allow
 negative integers.

 I did this, also taking Denis-de-Bernardy's advice and sticking with
 bigint(20), and it seems to have worked (knock on wood).

 SQL:
  ALTER TABLE wp_posts MODIFY post_parent BIGINT(20) NOT NULL DEFAULT 0;

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/9471#comment:41>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list