upgrades: rename stripe_id to transaction_id

* Rename the stripe_id column to transaction_id.
* Add a new payment_processor column to identity the processor used for
  this transaction (and hence, which backend system the transaction_id is for).
This commit is contained in:
evazion
2022-05-14 13:07:50 -05:00
parent 6de527f064
commit 4b65e96abc
7 changed files with 39 additions and 19 deletions

View File

@@ -2131,7 +2131,8 @@ CREATE TABLE public.user_upgrades (
purchaser_id bigint NOT NULL,
upgrade_type integer NOT NULL,
status integer NOT NULL,
stripe_id character varying
transaction_id character varying,
payment_processor integer DEFAULT 0 NOT NULL
);
@@ -4732,6 +4733,13 @@ CREATE INDEX index_user_sessions_on_session_id ON public.user_sessions USING btr
CREATE INDEX index_user_sessions_on_updated_at ON public.user_sessions USING btree (updated_at);
--
-- Name: index_user_upgrades_on_payment_processor; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_user_upgrades_on_payment_processor ON public.user_upgrades USING btree (payment_processor);
--
-- Name: index_user_upgrades_on_purchaser_id; Type: INDEX; Schema: public; Owner: -
--
@@ -4754,10 +4762,10 @@ CREATE INDEX index_user_upgrades_on_status ON public.user_upgrades USING btree (
--
-- Name: index_user_upgrades_on_stripe_id; Type: INDEX; Schema: public; Owner: -
-- Name: index_user_upgrades_on_transaction_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_user_upgrades_on_stripe_id ON public.user_upgrades USING btree (stripe_id);
CREATE INDEX index_user_upgrades_on_transaction_id ON public.user_upgrades USING btree (transaction_id);
--
@@ -5823,6 +5831,7 @@ INSERT INTO "schema_migrations" (version) VALUES
('20220403220558'),
('20220407203236'),
('20220410050628'),
('20220504235329');
('20220504235329'),
('20220514175125');