This is not how you assign a primary key:
Dear database designer
Moderator: Coders of Rage
- dandymcgee
- ES Beta Backer
- Posts: 4709
- Joined: Tue Apr 29, 2008 3:24 pm
- Current Project: https://github.com/dbechrd/RicoTech
- Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
- Programming Language of Choice: C
- Location: San Francisco
- Contact:
Dear database designer
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches!
- Nokurn
- Chaos Rift Regular
- Posts: 164
- Joined: Mon Jan 31, 2011 12:08 pm
- Favorite Gaming Platforms: PC, SNES, Dreamcast, PS2, N64
- Programming Language of Choice: Proper C++
- Location: Southern California
- Contact:
Re: Dear database designer
Mother of god. That's just asking for trouble. DId you fix it?
- dandymcgee
- ES Beta Backer
- Posts: 4709
- Joined: Tue Apr 29, 2008 3:24 pm
- Current Project: https://github.com/dbechrd/RicoTech
- Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
- Programming Language of Choice: C
- Location: San Francisco
- Contact:
Re: Dear database designer
I can't right now because my boss is on vacation and I don't know the details of what, if anything, accesses this table. It may just be a history table for our reference, as I don't know of any application that allows rolling back records. If that is the case, I'll remove all of the '_%TicketNumber%' suffixes from the pkBackupDate column and set (pkBackupDate, TicketNumber) to the primary key like it should be. There's a reason primary keys can span multiple columns and it's to prevent the need for this sort of silly "hashing" approach to creating a unique key.Nokurn wrote:Mother of god. That's just asking for trouble. DId you fix it?
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches!