add migration (#3590)

This commit is contained in:
RobertJoonas 2023-12-06 09:56:12 +00:00 committed by GitHub
parent cc18423369
commit 7212d336ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,11 @@
defmodule Plausible.Repo.Migrations.BackfillLastBillDateToSubscriptions do
use Ecto.Migration
def change do
execute """
UPDATE subscriptions
SET last_bill_date = inserted_at::date
WHERE last_bill_date IS NULL AND paddle_plan_id != 'free_10k';
"""
end
end