Renaming sequences
Mike Dewhirst <[email protected]> Wed, 18 Dec 2019 16:32:54 +1100
| Newsgroups | gmane.comp.db.postgresql.novice |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--------------D5D785F906C7B6387DAE06B9
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Are there any consequences for renaming sequences to match the tables
which own them?
In an existing production Django project I have just converted auth.user
into common.user and company.userprofile into common.userprofile.
Having gone through the migration process more or less unscathed the
original sequences are owned by the renamed tables. Eg
public.auth_user_id_seq is owned by public.common_user.id
Everything seems to work fine but my unit tests are playing up and error
messages are showing the original (and still correct) sequence names. It
would make much visual sense to me now and especially to the future me
(or anyone else) if the sequences were renamed as well.
I know how I could do it but I just need to know if I should.
Thanks for any advice
Mike
--------------D5D785F906C7B6387DAE06B9
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<font size="-1">Are there any consequences for renaming sequences to
match the tables which own them?<br>
<br>
In an existing production Django project I have just converted
auth.user into common.user and company.userprofile into
common.userprofile.<br>
<br>
Having gone through the migration process more or less unscathed
the original sequences are owned by the renamed tables. Eg
public.auth_user_id_seq is owned by public.common_user.id<br>
<br>
Everything seems to work fine but my unit tests are playing up and
error messages are showing the original (and still correct)
sequence names. It would make much visual sense to me now and
especially to the future me (or anyone else) if the sequences were
renamed as well.<br>
<br>
I know how I could do it but I just need to know if I should.<br>
<br>
Thanks for any advice<br>
<br>
Mike<br>
<br>
</font>
</body>
</html>
--------------D5D785F906C7B6387DAE06B9--