-- migrate:up
ALTER TABLE "payment"
    ADD COLUMN IF NOT EXISTS "sort" bigint NOT NULL DEFAULT 0;

UPDATE "payment"
SET "sort" = "id"
WHERE "sort" = 0;

-- migrate:down
ALTER TABLE "payment"
    DROP COLUMN IF EXISTS "sort";

