mirror of
https://github.com/status-im/status-go.git
synced 2025-01-29 07:57:07 +00:00
5 lines
284 B
SQL
5 lines
284 B
SQL
ALTER TABLE keypairs_accounts ADD COLUMN position INT NOT NULL DEFAULT 0;
|
|
|
|
UPDATE keypairs_accounts AS ka SET position = ka2.rowNumber FROM (
|
|
SELECT created_at, ROW_NUMBER() OVER (ORDER BY created_at) AS rowNumber FROM keypairs_accounts) AS ka2
|
|
WHERE ka.created_at = ka2.created_at; |