repo stringclasses 4
values | file_path stringlengths 6 193 | extension stringclasses 30
values | content stringlengths 0 5.21M | token_count int64 0 3.8M |
|---|---|---|---|---|
hyperswitch | migrations/2023-09-25-125007_add_surcharge_metadata_payment_attempt/up.sql | .sql | -- Your SQL goes here
ALTER TABLE payment_attempt
ADD COLUMN IF NOT EXISTS surcharge_metadata JSONB DEFAULT NULL; | 24 |
hyperswitch | migrations/2023-09-25-125007_add_surcharge_metadata_payment_attempt/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE payment_attempt
DROP COLUMN surcharge_metadata; | 22 |
hyperswitch | migrations/2024-04-24-075735_add-merchant-pkey-ttl-to-business-profile/up.sql | .sql | -- Your SQL goes here
ALTER TABLE business_profile ADD COLUMN IF NOT EXISTS extended_card_info_config JSONB DEFAULT NULL; | 24 |
hyperswitch | migrations/2024-04-24-075735_add-merchant-pkey-ttl-to-business-profile/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE business_profile DROP COLUMN IF EXISTS extended_card_info_config; | 24 |
hyperswitch | migrations/2023-01-19-122511_add_refund_error_code/up.sql | .sql | ALTER TABLE refund
ADD IF NOT EXISTS refund_error_code TEXT DEFAULT NULL;
| 15 |
hyperswitch | migrations/2023-01-19-122511_add_refund_error_code/down.sql | .sql | ALTER TABLE refund
DROP COLUMN IF EXISTS refund_error_code;
| 12 |
hyperswitch | migrations/2024-07-15-120121_change_primary_key_for_dispute/up.sql | .sql | -- Your SQL goes here
-- The below query will lock the dispute table
-- Running this query is not necessary on higher environments
-- as the application will work fine without these queries being run
-- This query is necessary for the application to not use id in update of dispute
-- This query should be run only after... | 107 |
hyperswitch | migrations/2024-07-15-120121_change_primary_key_for_dispute/down.sql | .sql | ALTER TABLE dispute DROP CONSTRAINT dispute_pkey;
ALTER TABLE dispute ADD PRIMARY KEY (id); | 18 |
hyperswitch | migrations/2024-12-10-091820_add-clear-pan-possible-to-gsm/up.sql | .sql | -- Your SQL goes here
ALTER TABLE gateway_status_map ADD COLUMN IF NOT EXISTS clear_pan_possible BOOLEAN NOT NULL DEFAULT FALSE; | 25 |
hyperswitch | migrations/2024-12-10-091820_add-clear-pan-possible-to-gsm/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE gateway_status_map DROP COLUMN IF EXISTS clear_pan_possible; | 24 |
hyperswitch | migrations/2024-04-29-075651_store_payment_method_data_billing_in_payment_methods/up.sql | .sql | -- Your SQL goes here
ALTER TABLE payment_methods
ADD COLUMN IF NOT EXISTS payment_method_billing_address BYTEA;
| 23 |
hyperswitch | migrations/2024-04-29-075651_store_payment_method_data_billing_in_payment_methods/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE payment_methods DROP COLUMN IF EXISTS payment_method_billing_address;
| 24 |
hyperswitch | migrations/2024-03-15-133951_pm-client-secret/up.sql | .sql | -- Your SQL goes here
ALTER TABLE payment_methods ADD COLUMN IF NOT EXISTS client_secret VARCHAR(128) DEFAULT NULL;
ALTER TABLE payment_methods ALTER COLUMN payment_method DROP NOT NULL; | 38 |
hyperswitch | migrations/2024-03-15-133951_pm-client-secret/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE payment_methods DROP COLUMN IF EXISTS client_secret;
ALTER TABLE payment_methods ALTER COLUMN payment_method SET NOT NULL; | 34 |
hyperswitch | migrations/2023-10-19-075810_add_surcharge_applicable_payment_intent/up.sql | .sql | ALTER TABLE payment_attempt
DROP COLUMN surcharge_metadata;
ALTER TABLE payment_intent
ADD surcharge_applicable boolean; | 23 |
hyperswitch | migrations/2023-10-19-075810_add_surcharge_applicable_payment_intent/down.sql | .sql | ALTER TABLE payment_attempt
ADD COLUMN IF NOT EXISTS surcharge_metadata JSONB DEFAULT NULL;
ALTER TABLE payment_intent
DROP COLUMN surcharge_applicable;
| 30 |
hyperswitch | migrations/2022-12-13-170152_add_connector_metadata/up.sql | .sql | ALTER TABLE merchant_connector_account ADD COLUMN metadata JSONB DEFAULT NULL;
| 13 |
hyperswitch | migrations/2022-12-13-170152_add_connector_metadata/down.sql | .sql | ALTER TABLE merchant_connector_account DROP COLUMN metadata;
| 9 |
hyperswitch | migrations/2023-02-07-070512_change_merchant_connector_id_data_type/up.sql | .sql | ALTER TABLE merchant_connector_account
ALTER COLUMN merchant_connector_id TYPE VARCHAR(128) USING merchant_connector_id::varchar;
ALTER TABLE merchant_connector_account
ALTER COLUMN merchant_connector_id DROP DEFAULT;
| 39 |
hyperswitch | migrations/2023-02-07-070512_change_merchant_connector_id_data_type/down.sql | .sql | CREATE SEQUENCE IF NOT EXISTS merchant_connector_id_seq OWNED BY merchant_connector_account.merchant_connector_id;
UPDATE merchant_connector_account
SET merchant_connector_id = id;
ALTER TABLE merchant_connector_account
ALTER COLUMN merchant_connector_id TYPE INTEGER USING (trim(merchant_connector_id)::integer);
ALT... | 77 |
hyperswitch | migrations/2022-12-07-055441_add_use_kv_to_merchant_account/up.sql | .sql | -- Your SQL goes here
CREATE TYPE "MerchantStorageScheme" AS ENUM (
'postgres_only',
'redis_kv'
);
ALTER TABLE merchant_account ADD COLUMN storage_scheme "MerchantStorageScheme" NOT NULL DEFAULT 'postgres_only';
| 47 |
hyperswitch | migrations/2022-12-07-055441_add_use_kv_to_merchant_account/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE merchant_account DROP COLUMN storage_scheme;
DROP TYPE "MerchantStorageScheme";
| 27 |
hyperswitch | migrations/2023-08-16-080721_make_connector_field_mandatory_capture_table/up.sql | .sql | -- Your SQL goes here
ALTER TABLE captures ALTER COLUMN connector SET NOT NULL;
ALTER TABLE captures RENAME COLUMN connector_transaction_id TO connector_capture_id;
ALTER TABLE captures add COLUMN IF NOT EXISTS connector_response_reference_id VARCHAR(128); | 48 |
hyperswitch | migrations/2023-08-16-080721_make_connector_field_mandatory_capture_table/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE captures ALTER COLUMN connector DROP NOT NULL;
ALTER TABLE captures RENAME COLUMN connector_capture_id TO connector_transaction_id;
ALTER TABLE captures DROP COLUMN IF EXISTS connector_response_reference_id; | 47 |
hyperswitch | migrations/2024-06-04-074145_add_client_secret_in_payouts/up.sql | .sql | -- Your SQL goes here
ALTER TABLE payouts ADD COLUMN IF NOT EXISTS client_secret VARCHAR(128) DEFAULT NULL;
ALTER TYPE "PayoutStatus" ADD VALUE IF NOT EXISTS 'requires_confirmation'; | 41 |
hyperswitch | migrations/2024-06-04-074145_add_client_secret_in_payouts/down.sql | .sql | ALTER TABLE payouts DROP COLUMN IF EXISTS client_secret; | 10 |
hyperswitch | migrations/2024-02-22-100718_role_name_org_id_constraint/up.sql | .sql | -- Your SQL goes here
CREATE UNIQUE INDEX role_name_org_id_org_scope_index ON roles(org_id, role_name) WHERE scope='organization';
CREATE UNIQUE INDEX role_name_merchant_id_merchant_scope_index ON roles(merchant_id, role_name) WHERE scope='merchant';
| 55 |
hyperswitch | migrations/2024-02-22-100718_role_name_org_id_constraint/down.sql | .sql | -- This file should undo anything in `up.sql`
DROP INDEX role_name_org_id_org_scope_index;
DROP INDEX role_name_merchant_id_merchant_scope_index;
| 33 |
hyperswitch | migrations/2023-02-22-100331_rename_pm_type_enum/up.sql | .sql | -- Your SQL goes here
ALTER TABLE payment_attempt
ALTER COLUMN payment_method TYPE VARCHAR;
ALTER TABLE payment_methods
ALTER COLUMN payment_method TYPE VARCHAR;
ALTER TABLE payment_methods
ALTER COLUMN payment_method_type TYPE VARCHAR;
ALTER TABLE payment_attempt DROP COLUMN payment_issuer;
ALTER TABLE payment_att... | 73 |
hyperswitch | migrations/2023-02-22-100331_rename_pm_type_enum/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE payment_attempt
ADD COLUMN payment_issuer VARCHAR;
CREATE TYPE "PaymentMethodType" AS ENUM (
'card',
'bank_transfer',
'netbanking',
'upi',
'open_banking',
'consumer_finance',
'wallet',
'pay_later'
);
ALTER TABLE payment_attempt
... | 124 |
hyperswitch | migrations/2022-11-21-133803_add_mandate_id_in_payment_attempt/up.sql | .sql | -- Your SQL goes here
ALTER TABLE payment_attempt ADD IF NOT EXISTS mandate_id VARCHAR(255);
| 22 |
hyperswitch | migrations/2022-11-21-133803_add_mandate_id_in_payment_attempt/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE payment_attempt DROP COLUMN IF EXISTS mandate_id; | 22 |
hyperswitch | migrations/2023-12-15-062816__net_amount_in_payment_attempt/up.sql | .sql | ALTER TABLE payment_attempt
ADD COLUMN IF NOT EXISTS net_amount BIGINT;
-- Backfill
UPDATE payment_attempt pa
SET net_amount = pa.amount + COALESCE(pa.surcharge_amount, 0) + COALESCE(pa.tax_amount, 0);
| 54 |
hyperswitch | migrations/2023-12-15-062816__net_amount_in_payment_attempt/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE payment_attempt DROP COLUMN IF EXISTS net_amount; | 22 |
hyperswitch | migrations/2023-11-02-074243_make_customer_id_nullable_in_address_table/up.sql | .sql | -- Your SQL goes here
ALTER TABLE address ALTER COLUMN customer_id DROP NOT NULL; | 17 |
hyperswitch | migrations/2023-11-02-074243_make_customer_id_nullable_in_address_table/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE address ALTER COLUMN customer_id SET NOT NULL; | 22 |
hyperswitch | migrations/2025-02-10-101701_recreate_varchar_id_column_for_merchant_account/up.sql | .sql | -- Your SQL goes here
ALTER TABLE merchant_account
ADD COLUMN IF NOT EXISTS id VARCHAR(64); | 22 |
hyperswitch | migrations/2025-02-10-101701_recreate_varchar_id_column_for_merchant_account/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE merchant_account DROP id; | 18 |
hyperswitch | migrations/2024-12-18-124527_add_new_value_in_success_based_routing_conclusive_state/up.sql | .sql | -- Your SQL goes here
DO $$
BEGIN
IF NOT EXISTS (
SELECT 1
FROM pg_enum
WHERE enumlabel = 'non_deterministic'
AND enumtypid = (SELECT oid FROM pg_type WHERE typname = 'SuccessBasedRoutingConclusiveState')
) THEN
ALTER TYPE "SuccessBasedRoutingConclusiveState" ADD VALUE... | 91 |
hyperswitch | migrations/2024-12-18-124527_add_new_value_in_success_based_routing_conclusive_state/down.sql | .sql | -- This file should undo anything in `up.sql`
SELECT 1;
| 15 |
hyperswitch | migrations/2023-04-19-120735_add_time_for_tables/up.sql | .sql | -- Your SQL goes here
ALTER TABLE merchant_account
ADD COLUMN IF NOT EXISTS created_at TIMESTAMP NOT NULL DEFAULT now(),
ADD COLUMN IF NOT EXISTS modified_at TIMESTAMP NOT NULL DEFAULT now();
ALTER TABLE merchant_connector_account
ADD COLUMN IF NOT EXISTS created_at TIMESTAMP NOT NULL DEFAULT now(),
ADD COLUMN IF NOT ... | 86 |
hyperswitch | migrations/2023-04-19-120735_add_time_for_tables/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE merchant_account
DROP COLUMN IF EXISTS created_at,
DROP COLUMN IF EXISTS modified_at;
ALTER TABLE merchant_connector_account
DROP COLUMN IF EXISTS created_at,
DROP COLUMN IF EXISTS modified_at;
ALTER TABLE customers
DROP COLUMN IF EXISTS modified_at;
| 61 |
hyperswitch | migrations/2024-02-11-092812_add_authentication_processor_enum_to_ConnectorType/up.sql | .sql | -- Your SQL goes here
ALTER TYPE "ConnectorType" ADD VALUE IF NOT EXISTS 'authentication_processor';
| 21 |
hyperswitch | migrations/2024-02-11-092812_add_authentication_processor_enum_to_ConnectorType/down.sql | .sql | -- This file should undo anything in `up.sql`
SELECT 1; | 15 |
hyperswitch | migrations/2024-07-23-100214_make_org_and_merchant_id_nullable_user_roles/up.sql | .sql | -- Your SQL goes here
-- The below query will lock the user_roles table
-- Running this query is not necessary on higher environments
-- as the application will work fine without these queries being run
-- This query should be run after the new version of application is deployed
ALTER TABLE user_roles DROP CONSTRAINT u... | 211 |
hyperswitch | migrations/2024-07-23-100214_make_org_and_merchant_id_nullable_user_roles/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE user_roles DROP CONSTRAINT user_roles_pkey;
ALTER TABLE user_roles ADD PRIMARY KEY (user_id, merchant_id);
ALTER TABLE user_roles ALTER COLUMN org_id SET NOT NULL;
ALTER TABLE user_roles ALTER COLUMN merchant_id SET NOT NULL;
ALTER TABLE user_roles DROP COLUMN... | 103 |
hyperswitch | migrations/2024-04-23-132120_add-extended-card-info-to-business-profile/up.sql | .sql | -- Your SQL goes here
ALTER TABLE business_profile ADD COLUMN IF NOT EXISTS is_extended_card_info_enabled BOOLEAN DEFAULT FALSE; | 24 |
hyperswitch | migrations/2024-04-23-132120_add-extended-card-info-to-business-profile/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE business_profile DROP COLUMN IF EXISTS is_extended_card_info_enabled; | 25 |
hyperswitch | migrations/2024-05-27-190323_add_new_status_to_payout_status/up.sql | .sql | -- Your SQL goes here
ALTER TYPE "PayoutStatus" ADD VALUE IF NOT EXISTS 'initiated';
ALTER TYPE "PayoutStatus" ADD VALUE IF NOT EXISTS 'expired';
ALTER TYPE "PayoutStatus" ADD VALUE IF NOT EXISTS 'reversed'; | 53 |
hyperswitch | migrations/2024-05-27-190323_add_new_status_to_payout_status/down.sql | .sql | SELECT 1; | 4 |
hyperswitch | migrations/2024-12-04-072648_add_is_click_to_pay_enabled/up.sql | .sql | -- Your SQL goes here
ALTER TABLE business_profile ADD COLUMN IF NOT EXISTS is_click_to_pay_enabled BOOLEAN NOT NULL DEFAULT FALSE; | 26 |
hyperswitch | migrations/2024-12-04-072648_add_is_click_to_pay_enabled/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE business_profile DROP COLUMN IF EXISTS is_click_to_pay_enabled; | 25 |
hyperswitch | migrations/2024-12-11-092649_add-authentication-product-ids-in-business-profile/up.sql | .sql | -- Your SQL goes here
ALTER TABLE business_profile
ADD COLUMN IF NOT EXISTS authentication_product_ids JSONB NULL;
| 23 |
hyperswitch | migrations/2024-12-11-092649_add-authentication-product-ids-in-business-profile/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE business_profile
DROP COLUMN IF EXISTS authentication_product_ids
| 24 |
hyperswitch | migrations/2022-11-08-101705_add_cancel_to_payment_intent_status/up.sql | .sql | -- Your SQL goes here
ALTER TYPE "IntentStatus" ADD VALUE 'cancelled' after 'failed';
| 21 |
hyperswitch | migrations/2022-11-08-101705_add_cancel_to_payment_intent_status/down.sql | .sql | DELETE FROM pg_enum
WHERE enumlabel = 'cancelled'
AND enumtypid = (
SELECT oid FROM pg_type WHERE typname = 'IntentStatus'
)
| 33 |
hyperswitch | migrations/2024-01-22-114747_add_authentication_fields_to_attempt/up.sql | .sql | -- Your SQL goes here
ALTER TABLE payment_attempt
ADD COLUMN IF NOT EXISTS external_three_ds_authentication_attempted BOOLEAN default false,
ADD COLUMN IF NOT EXISTS authentication_connector VARCHAR(64),
ADD COLUMN IF NOT EXISTS authentication_id VARCHAR(64); | 50 |
hyperswitch | migrations/2024-01-22-114747_add_authentication_fields_to_attempt/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE payment_attempt
DROP COLUMN IF EXISTS external_three_ds_authentication_attempted,
DROP COLUMN IF EXISTS authentication_connector,
DROP COLUMN IF EXISTS authentication_id; | 41 |
hyperswitch | migrations/2024-07-19-095541_change_primary_key_for_users/up.sql | .sql | -- Your SQL goes here
-- The below query will lock the users table
-- Running this query is not necessary on higher environments
-- as the application will work fine without these queries being run
-- This query should be run after the new version of application is deployed
ALTER TABLE users DROP CONSTRAINT users_pkey;... | 112 |
hyperswitch | migrations/2024-07-19-095541_change_primary_key_for_users/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE users DROP CONSTRAINT users_pkey;
ALTER TABLE users
ADD PRIMARY KEY (id);
| 30 |
hyperswitch | migrations/2024-07-15-111327_change_primary_key_for_merchant_account/up.sql | .sql | -- Your SQL goes here
-- The below query will lock the merchant account table
-- Running this query is not necessary on higher environments
-- as the application will work fine without these queries being run
-- This query is necessary for the application to not use id in update of merchant_account
-- This query should... | 135 |
hyperswitch | migrations/2024-07-15-111327_change_primary_key_for_merchant_account/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE merchant_account DROP CONSTRAINT merchant_account_pkey;
ALTER TABLE merchant_account
ADD PRIMARY KEY (id);
| 33 |
hyperswitch | migrations/2023-05-05-112013_add_evidence_col_in_dispute/up.sql | .sql | -- Your SQL goes here
ALTER TABLE dispute
ADD COLUMN evidence JSONB NOT NULL DEFAULT '{}'::JSONB; | 23 |
hyperswitch | migrations/2023-05-05-112013_add_evidence_col_in_dispute/down.sql | .sql | ALTER TABLE dispute DROP COLUMN evidence; | 7 |
hyperswitch | migrations/2024-03-01-111007_add_authentication_details_in_business_profile/up.sql | .sql | -- Your SQL goes here
ALTER TABLE business_profile
ADD COLUMN IF NOT EXISTS authentication_connector_details JSONB NULL;
| 23 |
hyperswitch | migrations/2024-03-01-111007_add_authentication_details_in_business_profile/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE business_profile
DROP COLUMN IF EXISTS authentication_connector_details; | 24 |
hyperswitch | migrations/2024-01-30-090815_alter_payout_type/up.sql | .sql | -- Your SQL goes here
ALTER TYPE "PayoutType" ADD VALUE IF NOT EXISTS 'wallet'; | 21 |
hyperswitch | migrations/2024-01-30-090815_alter_payout_type/down.sql | .sql | -- This file should undo anything in `up.sql`
SELECT 1; | 15 |
hyperswitch | migrations/2024-12-05-131123_add-email-theme-data-in-themes/up.sql | .sql | -- Your SQL goes here
ALTER TABLE themes ADD COLUMN IF NOT EXISTS email_primary_color VARCHAR(64) NOT NULL DEFAULT '#006DF9';
ALTER TABLE themes ADD COLUMN IF NOT EXISTS email_foreground_color VARCHAR(64) NOT NULL DEFAULT '#000000';
ALTER TABLE themes ADD COLUMN IF NOT EXISTS email_background_color VARCHAR(64) NOT NULL... | 141 |
hyperswitch | migrations/2024-12-05-131123_add-email-theme-data-in-themes/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE themes DROP COLUMN IF EXISTS email_primary_color;
ALTER TABLE themes DROP COLUMN IF EXISTS email_foreground_color;
ALTER TABLE themes DROP COLUMN IF EXISTS email_background_color;
ALTER TABLE themes DROP COLUMN IF EXISTS email_entity_name;
ALTER TABLE themes DRO... | 68 |
hyperswitch | migrations/2024-09-01-094614_remove-preferred-merchant-from-users/up.sql | .sql | -- Your SQL goes here
ALTER TABLE users DROP COLUMN preferred_merchant_id;
| 16 |
hyperswitch | migrations/2024-09-01-094614_remove-preferred-merchant-from-users/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE users ADD COLUMN preferred_merchant_id VARCHAR(64);
| 25 |
hyperswitch | migrations/2024-02-20-180952_add_connector_metadata_in_authentication/up.sql | .sql | -- Your SQL goes here
ALTER TABLE authentication ADD COLUMN IF NOT EXISTS connector_metadata JSONB DEFAULT NULL;
| 21 |
hyperswitch | migrations/2024-02-20-180952_add_connector_metadata_in_authentication/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE authentication DROP COLUMN IF EXISTS connector_metadata;
| 21 |
hyperswitch | migrations/2022-12-09-102635_mandate-connector-and-amount/up.sql | .sql | -- Your SQL goes here
ALTER TABLE mandate
RENAME COLUMN single_use_amount TO mandate_amount;
ALTER TABLE mandate
RENAME COLUMN single_use_currency TO mandate_currency;
ALTER TABLE mandate
ADD IF NOT EXISTS amount_captured INTEGER DEFAULT NULL,
ADD IF NOT EXISTS connector VARCHAR(255) NOT NULL DEFAULT 'dummy',
ADD IF NO... | 84 |
hyperswitch | migrations/2022-12-09-102635_mandate-connector-and-amount/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE mandate
RENAME COLUMN mandate_amount TO single_use_amount;
ALTER TABLE mandate
RENAME COLUMN mandate_currency TO single_use_currency;
ALTER TABLE mandate
DROP COLUMN IF EXISTS amount_captured,
DROP COLUMN IF EXISTS connector,
DROP COLUMN IF EXISTS connector_mand... | 67 |
hyperswitch | migrations/2023-03-23-095309_add_business_sub_label_to_mca/up.sql | .sql | ALTER TABLE merchant_connector_account
ADD COLUMN IF NOT EXISTS business_sub_label VARCHAR(64) DEFAULT 'default';
| 23 |
hyperswitch | migrations/2023-03-23-095309_add_business_sub_label_to_mca/down.sql | .sql | ALTER TABLE merchant_connector_account DROP COLUMN IF EXISTS business_sub_label;
| 13 |
hyperswitch | migrations/2024-06-14-145304_events_add_metadata_column/up.sql | .sql | ALTER TABLE events ADD COLUMN metadata JSONB DEFAULT NULL;
| 11 |
hyperswitch | migrations/2024-06-14-145304_events_add_metadata_column/down.sql | .sql | ALTER TABLE events DROP COLUMN metadata;
| 7 |
hyperswitch | migrations/2023-02-02-055700_add_payment_issuer_and_experience_in_payment_attempt/up.sql | .sql | -- Your SQL goes here
ALTER TABLE payment_attempt
ADD COLUMN IF NOT EXISTS payment_issuer VARCHAR(50);
ALTER TABLE payment_attempt
ADD COLUMN IF NOT EXISTS payment_experience VARCHAR(50);
| 41 |
hyperswitch | migrations/2023-02-02-055700_add_payment_issuer_and_experience_in_payment_attempt/down.sql | .sql | ALTER TABLE payment_attempt DROP COLUMN IF EXISTS payment_issuer;
ALTER TABLE payment_attempt DROP COLUMN IF EXISTS payment_experience;
| 23 |
hyperswitch | migrations/2023-03-15-185959_add_dispute_table/up.sql | .sql | CREATE TYPE "DisputeStage" AS ENUM ('pre_dispute', 'dispute', 'pre_arbitration');
CREATE TYPE "DisputeStatus" AS ENUM ('dispute_opened', 'dispute_expired', 'dispute_accepted', 'dispute_cancelled', 'dispute_challenged', 'dispute_won', 'dispute_lost');
CREATE TABLE dispute (
id SERIAL PRIMARY KEY,
dispute_id VA... | 457 |
hyperswitch | migrations/2023-03-15-185959_add_dispute_table/down.sql | .sql | DROP TABLE dispute;
DROP TYPE "DisputeStage";
DROP TYPE "DisputeStatus";
| 18 |
hyperswitch | migrations/2023-05-16-145008_mandate_data_in_pa/up.sql | .sql | -- Your SQL goes here
ALTER TABLE payment_attempt ADD COLUMN mandate_details JSONB;
| 17 |
hyperswitch | migrations/2023-05-16-145008_mandate_data_in_pa/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE payment_attempt DROP COLUMN mandate_details;
| 20 |
hyperswitch | migrations/2024-12-17-141811_add_relay_table/up.sql | .sql | -- Your SQL goes here
CREATE TYPE "RelayStatus" AS ENUM ('created', 'pending', 'failure', 'success');
CREATE TYPE "RelayType" AS ENUM ('refund');
CREATE TABLE relay (
id VARCHAR(64) PRIMARY KEY,
connector_resource_id VARCHAR(128) NOT NULL,
connector_id VARCHAR(64) NOT NULL,
profile_id VARCHAR(64) NOT ... | 186 |
hyperswitch | migrations/2024-12-17-141811_add_relay_table/down.sql | .sql | -- This file should undo anything in `up.sql`
DROP TABLE relay;
DROP TYPE IF EXISTS "RelayStatus";
DROP TYPE IF EXISTS "RelayType";
| 33 |
hyperswitch | migrations/2024-07-17-131830_alter_payment_link/up.sql | .sql | -- Add a new column for allowed domains and secure link endpoint
ALTER table payment_link ADD COLUMN IF NOT EXISTS secure_link VARCHAR(255); | 30 |
hyperswitch | migrations/2024-07-17-131830_alter_payment_link/down.sql | .sql | ALTER table payment_link DROP COLUMN IF EXISTS secure_link; | 11 |
hyperswitch | migrations/2023-09-17-152010_make_id_not_null_address/up.sql | .sql | -- Your SQL goes here
ALTER TABLE address ALTER COLUMN id DROP NOT NULL; | 16 |
hyperswitch | migrations/2023-09-17-152010_make_id_not_null_address/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE address ALTER COLUMN id SET NOT NULL; | 21 |
hyperswitch | migrations/2024-12-16-111228_add_new_col_payment_method_type_in_dynamic_routing_stats/up.sql | .sql | -- Your SQL goes here
ALTER TABLE dynamic_routing_stats
ADD COLUMN IF NOT EXISTS payment_method_type VARCHAR(64);
| 25 |
hyperswitch | migrations/2024-12-16-111228_add_new_col_payment_method_type_in_dynamic_routing_stats/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE dynamic_routing_stats
DROP COLUMN IF EXISTS payment_method_type;
| 25 |
hyperswitch | migrations/2024-07-29-062548_add-organization_name-and-id-fields-in-organization/up.sql | .sql | -- Your SQL goes here
ALTER TABLE organization
ADD COLUMN id VARCHAR(32);
ALTER TABLE organization
ADD COLUMN organization_name TEXT;
| 29 |
hyperswitch | migrations/2024-07-29-062548_add-organization_name-and-id-fields-in-organization/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE organization
DROP COLUMN id;
ALTER TABLE organization
DROP COLUMN organization_name; | 28 |
hyperswitch | migrations/2023-12-12-112941_create_pm_blocklist_table/up.sql | .sql | -- Your SQL goes here
CREATE TABLE blocklist (
id SERIAL PRIMARY KEY,
merchant_id VARCHAR(64) NOT NULL,
fingerprint_id VARCHAR(64) NOT NULL,
data_kind "BlocklistDataKind" NOT NULL,
metadata JSONB,
created_at TIMESTAMP NOT NULL
);
CREATE UNIQUE INDEX blocklist_unique_fingerprint_id_index ON blocklist (merc... | 110 |
hyperswitch | migrations/2023-12-12-112941_create_pm_blocklist_table/down.sql | .sql | -- This file should undo anything in `up.sql`
DROP TABLE blocklist;
| 16 |
hyperswitch | migrations/2024-06-20-142013_collect_billing_details_from_wallet_connector/up.sql | .sql | -- Your SQL goes here
ALTER TABLE business_profile ADD COLUMN IF NOT EXISTS collect_billing_details_from_wallet_connector BOOLEAN DEFAULT FALSE; | 25 |
hyperswitch | migrations/2024-06-20-142013_collect_billing_details_from_wallet_connector/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE business_profile DROP COLUMN IF EXISTS collect_billing_details_from_wallet_connector; | 26 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.