You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey @aaugustin@rmoch - I'm working on a project that needs to support some unfortunate functionality in a backwards compatible way in one of our tables. I'm using PostgreSQL 9.5.2, Django 1.9, and Python 2.7.11.
The model in need of the sequencing looks like this:
class Profile(models.Model):
uid = models.AutoField(primary_key=True)
unique_archaic_code = models.CharField(max_length=12L, unique=True)
We cannot change the structure of the Profile model - any performance enhancements we make on it must be backwards compatible. Otherwise I would say to heck with the unique_archaic_code system we have set up and make something more modern.
unique_archaic_code follows a specific alpha-numeric pattern. I generate values for it in the Python layer at the moment, but I want to abstract this out into a PostgreSQL SEQUENCE for obvious performance reasons, so we can potentially use a Django bulk_create statement that will make bulk creation of Profile objects with proper unique_archaic_codes possible.
unique_archaic_code must stay, and must continue to be filled with values that follow the old pattern defined in the Python layer - I want to replace that value filling with the sequencing your package appears to support.
Does this package support that functionality currently?
The text was updated successfully, but these errors were encountered:
Hey @aaugustin @rmoch - I'm working on a project that needs to support some unfortunate functionality in a backwards compatible way in one of our tables. I'm using PostgreSQL 9.5.2, Django 1.9, and Python 2.7.11.
The model in need of the sequencing looks like this:
We cannot change the structure of the
Profile
model - any performance enhancements we make on it must be backwards compatible. Otherwise I would say to heck with theunique_archaic_code
system we have set up and make something more modern.unique_archaic_code
follows a specific alpha-numeric pattern. I generate values for it in the Python layer at the moment, but I want to abstract this out into a PostgreSQLSEQUENCE
for obvious performance reasons, so we can potentially use a Djangobulk_create
statement that will make bulk creation ofProfile
objects with properunique_archaic_codes
possible.unique_archaic_code
must stay, and must continue to be filled with values that follow the old pattern defined in the Python layer - I want to replace that value filling with the sequencing your package appears to support.Does this package support that functionality currently?
The text was updated successfully, but these errors were encountered: