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/2022-12-20-065945_reduce_size_of_varchar_columns/up.sql | .sql | ALTER TABLE address
ALTER COLUMN address_id TYPE VARCHAR(64),
ALTER COLUMN city TYPE VARCHAR(128),
ALTER COLUMN country TYPE VARCHAR(64),
ALTER COLUMN state TYPE VARCHAR(128),
ALTER COLUMN zip TYPE VARCHAR(16),
ALTER COLUMN phone_number TYPE VARCHAR(32),
ALTER COLUMN country_code TYPE VARCHA... | 1,009 |
hyperswitch | migrations/2022-12-20-065945_reduce_size_of_varchar_columns/down.sql | .sql | ALTER TABLE address
ALTER COLUMN address_id TYPE VARCHAR(255),
ALTER COLUMN city TYPE VARCHAR(255),
ALTER COLUMN country TYPE VARCHAR(255),
ALTER COLUMN state TYPE VARCHAR(255),
ALTER COLUMN zip TYPE VARCHAR(255),
ALTER COLUMN phone_number TYPE VARCHAR(255),
ALTER COLUMN country_code TYPE VA... | 1,081 |
hyperswitch | migrations/2024-05-16-133628_make_connector_payout_id_nullalble/up.sql | .sql | -- Your SQL goes here
ALTER TABLE payout_attempt ALTER COLUMN connector_payout_id DROP NOT NULL;
UPDATE payout_attempt SET connector_payout_id = NULL WHERE connector_payout_id = ''; | 37 |
hyperswitch | migrations/2024-05-16-133628_make_connector_payout_id_nullalble/down.sql | .sql | -- This file should undo anything in `up.sql`
UPDATE payout_attempt
SET connector_payout_id = ''
WHERE connector_payout_id IS NULL;
ALTER TABLE payout_attempt
ALTER COLUMN connector_payout_id SET NOT NULL; | 45 |
hyperswitch | migrations/2022-12-10-123613_update_address_and_customer/up.sql | .sql | -- Your SQL goes here
ALTER TABLE address
ADD COLUMN customer_id VARCHAR(255) NOT NULL,
ADD COLUMN merchant_id VARCHAR(255) NOT NULL;
CREATE INDEX address_customer_id_merchant_id_index ON address (customer_id, merchant_id);
ALTER TABLE customers DROP COLUMN address; | 61 |
hyperswitch | migrations/2022-12-10-123613_update_address_and_customer/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE address
DROP COLUMN customer_id,
DROP COLUMN merchant_id;
ALTER TABLE customers ADD COLUMN address JSON; | 33 |
hyperswitch | migrations/2023-03-30-132338_add_start_end_date_for_mandates/up.sql | .sql | ALTER TABLE mandate
ADD IF NOT EXISTS start_date TIMESTAMP NULL,
ADD IF NOT EXISTS end_date TIMESTAMP NULL,
ADD COLUMN metadata JSONB DEFAULT NULL; | 30 |
hyperswitch | migrations/2023-03-30-132338_add_start_end_date_for_mandates/down.sql | .sql | ALTER TABLE mandate
DROP COLUMN IF EXISTS start_date,
DROP COLUMN IF EXISTS end_date,
DROP COLUMN IF EXISTS metadata; | 24 |
hyperswitch | migrations/2024-02-22-060352_add_mit_columns_to_payment_methods/up.sql | .sql | -- Your SQL goes here
ALTER TABLE payment_methods
ADD COLUMN connector_mandate_details JSONB
DEFAULT NULL;
ALTER TABLE payment_methods
ADD COLUMN customer_acceptance JSONB
DEFAULT NULL;
ALTER TABLE payment_methods
ADD COLUMN status VARCHAR(64)
NOT NULL DEFAULT 'active';
| 59 |
hyperswitch | migrations/2024-02-22-060352_add_mit_columns_to_payment_methods/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE payment_methods
DROP COLUMN status;
ALTER TABLE payment_methods
DROP COLUMN customer_acceptance;
ALTER TABLE payment_methods
DROP COLUMN connector_mandate_details;
| 44 |
hyperswitch | migrations/2023-12-14-060824_user_roles_user_status_column/up.sql | .sql | -- Your SQL goes here
ALTER TABLE user_roles RENAME COLUMN last_modified_at TO last_modified;
CREATE TYPE "UserStatus" AS ENUM ('active', 'invitation_sent');
ALTER TABLE user_roles ALTER COLUMN status TYPE "UserStatus" USING (status::"UserStatus");
| 55 |
hyperswitch | migrations/2023-12-14-060824_user_roles_user_status_column/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE user_roles RENAME COLUMN last_modified TO last_modified_at;
ALTER TABLE user_roles ALTER COLUMN status TYPE VARCHAR(64) USING (status::text);
DROP TYPE IF EXISTS "UserStatus";
| 52 |
hyperswitch | migrations/2023-09-14-032447_add_payment_id_in_address/up.sql | .sql | -- Your SQL goes here
ALTER TABLE address ADD COLUMN payment_id VARCHAR(64);
ALTER TABLE customers ADD COLUMN address_id VARCHAR(64); | 30 |
hyperswitch | migrations/2023-09-14-032447_add_payment_id_in_address/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE address DROP COLUMN payment_id;
ALTER TABLE customers DROP COLUMN address_id; | 27 |
hyperswitch | migrations/2024-02-21-120100_add_last_used_at_in_payment_methods/up.sql | .sql | -- Your SQL goes here
ALTER TABLE payment_methods ADD COLUMN IF NOT EXISTS last_used_at TIMESTAMP NOT NULL DEFAULT now()::TIMESTAMP; | 28 |
hyperswitch | migrations/2024-02-21-120100_add_last_used_at_in_payment_methods/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE payment_methods DROP COLUMN IF EXISTS last_used_at; | 23 |
hyperswitch | migrations/2024-07-22-082828_change_primary_key_for_payment_methods/up.sql | .sql | -- Your SQL goes here
-- The below query will lock the payment_methods 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 payment_methods DROP CO... | 118 |
hyperswitch | migrations/2024-07-22-082828_change_primary_key_for_payment_methods/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE payment_methods DROP CONSTRAINT payment_methods_pkey;
ALTER TABLE payment_methods
ADD PRIMARY KEY (id);
| 33 |
hyperswitch | migrations/2024-07-23-060446_always_collect_billing_details_from_wallet_connector/up.sql | .sql | -- Your SQL goes here
ALTER TABLE business_profile ADD COLUMN IF NOT EXISTS always_collect_billing_details_from_wallet_connector BOOLEAN DEFAULT FALSE; | 26 |
hyperswitch | migrations/2024-07-23-060446_always_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 always_collect_billing_details_from_wallet_connector; | 27 |
hyperswitch | migrations/2024-07-11-072518_add_customer_acceptance_in_payment_attempt/up.sql | .sql | -- Your SQL goes here
ALTER TABLE payment_attempt ADD COLUMN IF NOT EXISTS customer_acceptance JSONB DEFAULT NULL;
| 23 |
hyperswitch | migrations/2024-07-11-072518_add_customer_acceptance_in_payment_attempt/down.sql | .sql | ALTER TABLE payment_attempt DROP COLUMN IF EXISTS customer_acceptance; | 12 |
hyperswitch | migrations/2023-11-28-081058_add-request_incremental_authorization-in-payment-intent/up.sql | .sql | -- Your SQL goes here
CREATE TYPE "RequestIncrementalAuthorization" AS ENUM ('true', 'false', 'default');
ALTER TABLE payment_intent ADD COLUMN IF NOT EXISTS request_incremental_authorization "RequestIncrementalAuthorization" NOT NULL DEFAULT 'false'::"RequestIncrementalAuthorization";
| 58 |
hyperswitch | migrations/2023-11-28-081058_add-request_incremental_authorization-in-payment-intent/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE payment_intent DROP COLUMN IF EXISTS request_incremental_authorization;
DROP TYPE "RequestIncrementalAuthorization";
| 33 |
hyperswitch | migrations/2022-12-05-090521_single_use_mandate_fields/up.sql | .sql | -- Your SQL goes here
ALTER TABLE mandate
ADD IF NOT EXISTS single_use_amount INTEGER DEFAULT NULL,
ADD IF NOT EXISTS single_use_currency "Currency" DEFAULT NULL;
| 34 |
hyperswitch | migrations/2022-12-05-090521_single_use_mandate_fields/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE mandate
DROP COLUMN IF EXISTS single_use_amount,
DROP COLUMN IF EXISTS single_use_currency; | 31 |
hyperswitch | migrations/2024-11-20-110014_add-entity-type-and-theme-name-in-themes/up.sql | .sql | -- Your SQL goes here
ALTER TABLE themes ADD COLUMN IF NOT EXISTS entity_type VARCHAR(64) NOT NULL;
ALTER TABLE themes ADD COLUMN IF NOT EXISTS theme_name VARCHAR(64) NOT NULL;
| 42 |
hyperswitch | migrations/2024-11-20-110014_add-entity-type-and-theme-name-in-themes/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE themes DROP COLUMN IF EXISTS entity_type;
ALTER TABLE themes DROP COLUMN IF EXISTS theme_name;
| 31 |
hyperswitch | migrations/2025-03-10-060950_add_issuer_code_and_message_in_payment_attempt/up.sql | .sql | ALTER TABLE payment_attempt
ADD COLUMN IF NOT EXISTS issuer_error_code VARCHAR(64) DEFAULT NULL,
ADD COLUMN IF NOT EXISTS issuer_error_message TEXT DEFAULT NULL;
ALTER TABLE refund
ADD COLUMN IF NOT EXISTS issuer_error_code VARCHAR(64) DEFAULT NULL,
ADD COLUMN IF NOT EXISTS issuer_error_message TEXT DEFAULT NULL; | 65 |
hyperswitch | migrations/2025-03-10-060950_add_issuer_code_and_message_in_payment_attempt/down.sql | .sql | ALTER TABLE payment_attempt
DROP COLUMN IF EXISTS issuer_error_code,
DROP COLUMN IF EXISTS issuer_error_message;
ALTER TABLE refund
DROP COLUMN IF EXISTS issuer_error_code,
DROP COLUMN IF EXISTS issuer_error_message; | 41 |
hyperswitch | migrations/2024-09-03-053218_add_unified_code_message_to_payout/up.sql | .sql | ALTER TABLE payout_attempt
ADD COLUMN IF NOT EXISTS unified_code VARCHAR(255) DEFAULT NULL,
ADD COLUMN IF NOT EXISTS unified_message VARCHAR(1024) DEFAULT NULL; | 38 |
hyperswitch | migrations/2024-09-03-053218_add_unified_code_message_to_payout/down.sql | .sql | ALTER TABLE payout_attempt
DROP COLUMN IF EXISTS unified_code,
DROP COLUMN IF EXISTS unified_message; | 19 |
hyperswitch | migrations/2023-02-09-093400_add_bank_redirect/up.sql | .sql | -- Your SQL goes here
ALTER TYPE "PaymentMethodType" ADD VALUE 'bank_redirect' after 'paypal';
| 23 |
hyperswitch | migrations/2023-02-09-093400_add_bank_redirect/down.sql | .sql | -- This file should undo anything in `up.sql`
DELETE FROM pg_enum
WHERE enumlabel = 'bank_redirect'
AND enumtypid = (
SELECT oid FROM pg_type WHERE typname = 'PaymentMethodType'
)
| 46 |
hyperswitch | migrations/2023-08-28-131238_make_business_details_optional/up.sql | .sql | -- Your SQL goes here
ALTER TABLE payment_intent
ALTER COLUMN business_country DROP NOT NULL;
ALTER TABLE payment_intent
ALTER COLUMN business_label DROP NOT NULL;
ALTER TABLE merchant_connector_account
ALTER COLUMN business_country DROP NOT NULL;
ALTER TABLE merchant_connector_account
ALTER COLUMN business_label DR... | 136 |
hyperswitch | migrations/2023-08-28-131238_make_business_details_optional/down.sql | .sql | -- This file should undo anything in `up.sql`
-- The changes cannot be reversed, once we move to business profiles, cannot revert back to business_labels
SELECT 1;
| 36 |
hyperswitch | migrations/2024-06-23-200642_add_billing_details_in_payment_intent/up.sql | .sql | -- Your SQL goes here
ALTER TABLE payment_intent ADD COLUMN IF NOT EXISTS billing_details BYTEA DEFAULT NULL;
| 22 |
hyperswitch | migrations/2024-06-23-200642_add_billing_details_in_payment_intent/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE payment_intent DROP COLUMN IF EXISTS billing_details;
| 22 |
hyperswitch | migrations/2023-03-04-114058_remove_api_key_column_merchant_account_table/up.sql | .sql | ALTER TABLE merchant_account DROP COLUMN api_key;
| 9 |
hyperswitch | migrations/2023-03-04-114058_remove_api_key_column_merchant_account_table/down.sql | .sql | ALTER TABLE merchant_account
ADD COLUMN api_key VARCHAR(128);
| 15 |
hyperswitch | migrations/2024-04-28-095920_make_error_message_field_text/up.sql | .sql | -- Your SQL goes here
ALTER TABLE authentication ALTER COLUMN error_message TYPE TEXT; | 16 |
hyperswitch | migrations/2024-04-28-095920_make_error_message_field_text/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE authentication ALTER COLUMN error_message TYPE VARCHAR(64); | 24 |
hyperswitch | migrations/2023-04-25-061159_rename_country_code_to_country_alpha2/up.sql | .sql | -- Your SQL goes here
ALTER TYPE "CountryCode" RENAME TO "CountryAlpha2"; | 20 |
hyperswitch | migrations/2023-04-25-061159_rename_country_code_to_country_alpha2/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TYPE "CountryAlpha2" RENAME TO "CountryCode"; | 25 |
hyperswitch | migrations/2023-10-06-101134_add_paymentLink_metadata_in_merchant_account/up.sql | .sql | -- Your SQL goes here
ALTER TABLE merchant_account
ADD COLUMN IF NOT EXISTS payment_link_config JSONB NULL;
| 23 |
hyperswitch | migrations/2023-10-06-101134_add_paymentLink_metadata_in_merchant_account/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE merchant_account DROP COLUMN payment_link_config; | 21 |
hyperswitch | migrations/2025-03-04-105454_add_force_3ds_challenge_column_to_business_profile/up.sql | .sql | ALTER TABLE business_profile
ADD COLUMN IF NOT EXISTS force_3ds_challenge boolean DEFAULT false; | 19 |
hyperswitch | migrations/2025-03-04-105454_add_force_3ds_challenge_column_to_business_profile/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE business_profile
DROP COLUMN force_3ds_challenge; | 24 |
hyperswitch | migrations/2024-07-23-060936_always_collect_shipping_details_from_wallet_connector/up.sql | .sql | -- Your SQL goes here
ALTER TABLE business_profile ADD COLUMN IF NOT EXISTS always_collect_shipping_details_from_wallet_connector BOOLEAN DEFAULT FALSE; | 26 |
hyperswitch | migrations/2024-07-23-060936_always_collect_shipping_details_from_wallet_connector/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE business_profile DROP COLUMN IF EXISTS always_collect_shipping_details_from_wallet_connector; | 27 |
hyperswitch | migrations/2024-09-05-160455_add_new_col_is_dynamic_routing_algorithm_in_business_profile/up.sql | .sql | -- Your SQL goes here
ALTER TABLE
business_profile
ADD
COLUMN dynamic_routing_algorithm JSON DEFAULT NULL; | 24 |
hyperswitch | migrations/2024-09-05-160455_add_new_col_is_dynamic_routing_algorithm_in_business_profile/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE business_profile
DROP COLUMN dynamic_routing_algorithm;
| 22 |
hyperswitch | migrations/2024-02-07-075631_add_request_external_authentication_in_intent/up.sql | .sql | -- Your SQL goes here
ALTER TABLE payment_intent ADD COLUMN IF NOT EXISTS request_external_three_ds_authentication BOOLEAN;
| 22 |
hyperswitch | migrations/2024-02-07-075631_add_request_external_authentication_in_intent/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE payment_intent DROP COLUMN IF EXISTS request_external_three_ds_authentication; | 25 |
hyperswitch | migrations/2024-02-12-135546_add_fingerprint_id_in_payment_attempt/up.sql | .sql | -- Your SQL goes here
ALTER TABLE payment_attempt ADD COLUMN IF NOT EXISTS fingerprint_id VARCHAR(64);
| 22 |
hyperswitch | migrations/2024-02-12-135546_add_fingerprint_id_in_payment_attempt/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE payment_attempt DROP COLUMN IF EXISTS fingerprint_id;
| 22 |
hyperswitch | migrations/2024-10-26-105654_add_column_tenant_id_to_user_roles/up.sql | .sql | -- Your SQL goes here
ALTER TABLE user_roles ADD COLUMN IF NOT EXISTS tenant_id VARCHAR(64) NOT NULL DEFAULT 'public';
| 28 |
hyperswitch | migrations/2024-10-26-105654_add_column_tenant_id_to_user_roles/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE user_roles DROP COLUMN IF EXISTS tenant_id; | 22 |
hyperswitch | migrations/2023-03-16-105114_add_data_collection_status/up.sql | .sql | ALTER TYPE "AttemptStatus" ADD VALUE IF NOT EXISTS 'device_data_collection_pending'; | 17 |
hyperswitch | migrations/2023-03-16-105114_add_data_collection_status/down.sql | .sql | DELETE FROM pg_enum
WHERE enumlabel = 'device_data_collection_pending'
AND enumtypid = (
SELECT oid FROM pg_type WHERE typname = 'AttemptStatus'
) | 36 |
hyperswitch | migrations/2022-12-21-124904_remove_metadata_default_as_null/up.sql | .sql | ALTER TABLE payment_intent ALTER COLUMN metadata DROP DEFAULT; | 10 |
hyperswitch | migrations/2022-12-21-124904_remove_metadata_default_as_null/down.sql | .sql | ALTER TABLE payment_intent ALTER COLUMN metadata SET DEFAULT '{}'::JSONB; | 14 |
hyperswitch | migrations/2023-06-22-161131_change-type-of-frm-configs.sql/up.sql | .sql | UPDATE merchant_connector_account set frm_configs = null ;
ALTER TABLE merchant_connector_account
ALTER COLUMN frm_configs TYPE jsonb[]
USING ARRAY[frm_configs]::jsonb[];
UPDATE merchant_connector_account set frm_configs = null ;
| 45 |
hyperswitch | migrations/2023-06-22-161131_change-type-of-frm-configs.sql/down.sql | .sql | ALTER TABLE merchant_connector_account
ALTER COLUMN frm_configs TYPE jsonb
USING frm_configs[1]::jsonb; | 25 |
hyperswitch | migrations/2023-11-17-084413_add-unified-error-code-mssg-payment-attempt/up.sql | .sql | -- Your SQL goes here
ALTER TABLE payment_attempt ADD COLUMN IF NOT EXISTS unified_code VARCHAR(255);
ALTER TABLE payment_attempt ADD COLUMN IF NOT EXISTS unified_message VARCHAR(1024); | 41 |
hyperswitch | migrations/2023-11-17-084413_add-unified-error-code-mssg-payment-attempt/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE payment_attempt DROP COLUMN IF EXISTS unified_code;
ALTER TABLE payment_attempt DROP COLUMN IF EXISTS unified_message; | 33 |
hyperswitch | migrations/2023-03-23-123920_add_business_label_and_country_to_pi/up.sql | .sql | ALTER TABLE payment_intent
ADD COLUMN IF NOT EXISTS business_country VARCHAR(2) NOT NULL DEFAULT 'US',
ADD COLUMN IF NOT EXISTS business_label VARCHAR(64) NOT NULL DEFAULT 'default';
| 41 |
hyperswitch | migrations/2023-03-23-123920_add_business_label_and_country_to_pi/down.sql | .sql | ALTER TABLE payment_intent
DROP COLUMN IF EXISTS business_country,
DROP COLUMN IF EXISTS business_label; | 19 |
hyperswitch | migrations/2023-12-12-113330_add_fingerprint_id_in_payment_intent/up.sql | .sql | -- Your SQL goes here
ALTER TABLE payment_intent ADD COLUMN IF NOT EXISTS fingerprint_id VARCHAR(64);
| 22 |
hyperswitch | migrations/2023-12-12-113330_add_fingerprint_id_in_payment_intent/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE payment_intent DROP COLUMN IF EXISTS fingerprint_id;
| 22 |
hyperswitch | migrations/2024-05-08-111348_delete_unused_column_from_authentication/up.sql | .sql | -- Your SQL goes here
ALTER TABLE authentication DROP COLUMN three_dsserver_trans_id; | 18 |
hyperswitch | migrations/2024-05-08-111348_delete_unused_column_from_authentication/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE authentication ADD COLUMN three_dsserver_trans_id VARCHAR; | 24 |
hyperswitch | migrations/2024-05-06-165401_add_charges_in_payment_intent/up.sql | .sql | ALTER TABLE payment_intent ADD COLUMN IF NOT EXISTS charges jsonb;
ALTER TABLE payment_attempt
ADD COLUMN IF NOT EXISTS charge_id VARCHAR(64);
ALTER TABLE refund ADD COLUMN IF NOT EXISTS charges jsonb;
| 42 |
hyperswitch | migrations/2024-05-06-165401_add_charges_in_payment_intent/down.sql | .sql | ALTER TABLE payment_intent DROP COLUMN IF EXISTS charges;
ALTER TABLE payment_attempt DROP COLUMN IF EXISTS charge_id;
ALTER TABLE refund DROP COLUMN IF EXISTS charges;
| 30 |
hyperswitch | migrations/00000000000000_diesel_initial_setup/up.sql | .sql | -- This file was automatically created by Diesel to setup helper functions
-- and other internal bookkeeping. This file is safe to edit, any future
-- changes will be added to existing projects as new migrations.
-- Sets up a trigger for the given table to automatically set a column called
-- `updated_at` whenever ... | 249 |
hyperswitch | migrations/00000000000000_diesel_initial_setup/down.sql | .sql | -- This file was automatically created by Diesel to setup helper functions
-- and other internal bookkeeping. This file is safe to edit, any future
-- changes will be added to existing projects as new migrations.
DROP FUNCTION IF EXISTS diesel_manage_updated_at(_tbl regclass);
DROP FUNCTION IF EXISTS diesel_set_update... | 64 |
hyperswitch | migrations/2024-08-12-104928_add_api_version_in_mca/up.sql | .sql | -- Your SQL goes here
ALTER TABLE merchant_connector_account
ADD COLUMN IF NOT EXISTS version "ApiVersion" NOT NULL DEFAULT 'v1';
| 29 |
hyperswitch | migrations/2024-08-12-104928_add_api_version_in_mca/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE merchant_connector_account DROP COLUMN IF EXISTS version; | 22 |
hyperswitch | migrations/2022-09-29-084920_create_initial_tables/up.sql | .sql | -- Types
CREATE TYPE "AttemptStatus" AS ENUM (
'started',
'authentication_failed',
'juspay_declined',
'pending_vbv',
'vbv_successful',
'authorized',
'authorization_failed',
'charged',
'authorizing',
'cod_initiated',
'voided',
'void_initiated',
'capture_initiated',
... | 3,348 |
hyperswitch | migrations/2022-09-29-084920_create_initial_tables/down.sql | .sql | -- Tables
DROP TABLE address;
DROP TABLE configs;
DROP TABLE customers;
DROP TABLE events;
DROP TABLE locker_mock_up;
DROP TABLE mandate;
DROP TABLE merchant_account;
DROP TABLE merchant_connector_account;
DROP TABLE payment_attempt;
DROP TABLE payment_intent;
DROP TABLE payment_methods;
DROP TABLE process_t... | 202 |
hyperswitch | migrations/2023-02-20-101809_update_merchant_connector_account/up.sql | .sql | ALTER TABLE merchant_connector_account
ADD COLUMN connector_label VARCHAR(255),
ADD COLUMN business_country VARCHAR(2) DEFAULT 'US' NOT NULL,
ADD COLUMN business_label VARCHAR(255) DEFAULT 'default' NOT NULL;
-- To backfill, use `US` as default country and `default` as the business_label
UPDATE merchant_connec... | 171 |
hyperswitch | migrations/2023-02-20-101809_update_merchant_connector_account/down.sql | .sql | ALTER TABLE merchant_connector_account
DROP COLUMN IF EXISTS connector_label,
DROP COLUMN IF EXISTS business_country,
DROP COLUMN IF EXISTS business_label;
DROP INDEX IF EXISTS merchant_connector_account_merchant_id_connector_label_index;
CREATE UNIQUE INDEX merchant_connector_account_merchant_id_connector_name_index ... | 64 |
hyperswitch | migrations/2022-11-03-130214_create_connector_response_table/up.sql | .sql | -- Your SQL goes here
CREATE TABLE connector_response (
id SERIAL PRIMARY KEY,
payment_id VARCHAR(255) NOT NULL,
merchant_id VARCHAR(255) NOT NULL,
txn_id VARCHAR(255) NOT NULL,
created_at TIMESTAMP NOT NULL DEFAULT now()::TIMESTAMP,
modified_at TIMESTAMP NOT NULL DEFAULT now()::TIMESTAMP,
c... | 131 |
hyperswitch | migrations/2022-11-03-130214_create_connector_response_table/down.sql | .sql | -- This file should undo anything in `up.sql`
DROP TABLE connector_response; | 16 |
hyperswitch | migrations/2023-08-24-095037_add_profile_id_in_file_metadata/up.sql | .sql | -- Your SQL goes here
ALTER TABLE file_metadata
ADD COLUMN IF NOT EXISTS profile_id VARCHAR(64);
| 23 |
hyperswitch | migrations/2023-08-24-095037_add_profile_id_in_file_metadata/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE file_metadata DROP COLUMN IF EXISTS profile_id;
| 22 |
hyperswitch | migrations/2025-01-03-084904_add_currencies/up.sql | .sql | DO $$
DECLARE currency TEXT;
BEGIN
FOR currency IN
SELECT
unnest(
ARRAY ['AFN', 'BTN', 'CDF', 'ERN', 'IRR', 'ISK', 'KPW', 'SDG', 'SYP', 'TJS', 'TMT', 'ZWL']
) AS currency
LOOP
IF NOT EXISTS (
SELECT 1
FROM pg_enum
WHERE enumlabel ... | 147 |
hyperswitch | migrations/2025-01-03-084904_add_currencies/down.sql | .sql | SELECT 1;
| 4 |
hyperswitch | migrations/2024-06-06-101812_user_optional_password/up.sql | .sql | -- Your SQL goes here
ALTER TABLE users ALTER COLUMN password DROP NOT NULL;
| 16 |
hyperswitch | migrations/2024-06-06-101812_user_optional_password/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE users ALTER COLUMN password SET NOT NULL;
| 21 |
hyperswitch | migrations/2022-12-27-172643_update_locker_mock_up/up.sql | .sql | -- Your SQL goes here
ALTER TABLE locker_mock_up
ADD COLUMN payment_method_id VARCHAR(64); | 22 |
hyperswitch | migrations/2022-12-27-172643_update_locker_mock_up/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE locker_mock_up
DROP COLUMN payment_method_id; | 23 |
hyperswitch | migrations/2023-07-08-134807_add_connector_response_reference_id_in_payment_intent/up.sql | .sql | -- Your SQL goes here
ALTER TABLE payment_attempt ADD COLUMN IF NOT EXISTS connector_response_reference_id VARCHAR(128); | 25 |
hyperswitch | migrations/2023-07-08-134807_add_connector_response_reference_id_in_payment_intent/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE payment_attempt DROP COLUMN IF EXISTS connector_response_reference_id;
| 24 |
hyperswitch | migrations/2023-08-01-165717_make_event_id_unique_for_events_table/up.sql | .sql | -- Your SQL goes here
ALTER TABLE events
ADD CONSTRAINT event_id_unique UNIQUE (event_id);
| 20 |
hyperswitch | migrations/2023-08-01-165717_make_event_id_unique_for_events_table/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE events DROP CONSTRAINT event_id_unique;
| 20 |
hyperswitch | migrations/2023-04-19-120503_update_customer_connector_customer/up.sql | .sql | -- Your SQL goes here
ALTER TABLE customers
ADD COLUMN connector_customer JSONB; | 17 |
hyperswitch | migrations/2023-04-19-120503_update_customer_connector_customer/down.sql | .sql | ALTER TABLE customers DROP COLUMN connector_customer; | 8 |
hyperswitch | migrations/2023-12-27-104559_business_profile_add_session_expiry/up.sql | .sql | -- Your SQL goes here
ALTER TABLE business_profile ADD COLUMN IF NOT EXISTS session_expiry BIGINT DEFAULT NULL;
| 22 |
hyperswitch | migrations/2023-12-27-104559_business_profile_add_session_expiry/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE business_profile DROP COLUMN IF EXISTS session_expiry; | 22 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.