mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
fix: resolve null VoteTS columns via migration
Somehow, many aur.al records of PackageVotes do not have a valid VoteTS value. This migration fixes that issue by setting all null VoteTS columns to the epoch timestamp. Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
1d86b3e210
commit
8387f325f6
3 changed files with 53 additions and 13 deletions
|
@ -269,7 +269,7 @@ PackageVotes = Table(
|
|||
'PackageVotes', metadata,
|
||||
Column('UsersID', ForeignKey('Users.ID', ondelete='CASCADE'), nullable=False),
|
||||
Column('PackageBaseID', ForeignKey('PackageBases.ID', ondelete='CASCADE'), nullable=False),
|
||||
Column('VoteTS', BIGINT(unsigned=True)),
|
||||
Column('VoteTS', BIGINT(unsigned=True), nullable=False),
|
||||
Index('VoteUsersIDPackageID', 'UsersID', 'PackageBaseID', unique=True),
|
||||
Index('VotesPackageBaseID', 'PackageBaseID'),
|
||||
Index('VotesUsersID', 'UsersID'),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue