• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Primary keys
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Primary keys


  • Subject: Primary keys
  • From: Mark Wardle <email@hidden>
  • Date: Thu, 02 Oct 2014 10:00:29 +0100

Dear all,

I need to add a new primary key to a table that already contains data. 

Is it possible to use migrations to add this and have the column auto-populated with a serial number?

My other plan was to create an integer column and then, in code, iterate through the objects manually setting the serial integer, and then later on migrating that to a primary key. Would this then break primary key generation for newly created objects?

All advice appreciated!

Many thanks,

Mark


-- 
Dr. Mark Wardle
Consultant Neurologist, University Hospital Wales, Cardiff, UK
Email: email@hidden or email@hidden  Twitter: @mwardle
Telephone: 02920745274 (secretary) or facsimile: 02920744166





 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Primary keys
      • From: Theodore Petrosky <email@hidden>
    • Re: Primary keys
      • From: Fabian Peters <email@hidden>
  • Prev by Date: Re: Static resources in CSS file while using Linux as dev platform
  • Next by Date: Re: Primary keys
  • Previous by thread: Re: Static resources in CSS file while using Linux as dev platform
  • Next by thread: Re: Primary keys
  • Index(es):
    • Date
    • Thread