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-08-112817_applepay_verified_domains_in_business_profile/up.sql
.sql
ALTER TABLE business_profile ADD COLUMN IF NOT EXISTS applepay_verified_domains text[];
16
hyperswitch
migrations/2023-09-08-112817_applepay_verified_domains_in_business_profile/down.sql
.sql
ALTER TABLE business_profile DROP COLUMN IF EXISTS applepay_verified_domains;
13
hyperswitch
migrations/2023-06-26-124254_add_vnd_to_currency_enum/up.sql
.sql
-- Your SQL goes here ALTER TYPE "Currency" ADD VALUE IF NOT EXISTS 'VND' AFTER 'UZS';
26
hyperswitch
migrations/2023-06-26-124254_add_vnd_to_currency_enum/down.sql
.sql
-- This file should undo anything in `up.sql` SELECT 1;
15
hyperswitch
migrations/2024-09-15-080630_add_addtional_payout_method_data_column_to_payout_attempt_table/up.sql
.sql
-- Your SQL goes here ALTER TABLE payout_attempt ADD COLUMN IF NOT EXISTS additional_payout_method_data JSONB DEFAULT NULL;
26
hyperswitch
migrations/2024-09-15-080630_add_addtional_payout_method_data_column_to_payout_attempt_table/down.sql
.sql
-- This file should undo anything in `up.sql` ALTER TABLE payout_attempt DROP COLUMN IF EXISTS additional_payout_method_data;
25
hyperswitch
migrations/2023-10-05-114138_add_payment_id_in_mandate/up.sql
.sql
-- Your SQL goes here ALTER TABLE mandate ADD COLUMN original_payment_id VARCHAR(64);
19
hyperswitch
migrations/2023-10-05-114138_add_payment_id_in_mandate/down.sql
.sql
ALTER TABLE mandate DROP COLUMN original_payment_id;
9
hyperswitch
migrations/2025-01-13-060852_add_card_discovery_in_payment_attempt/up.sql
.sql
-- Your SQL goes here CREATE TYPE "CardDiscovery" AS ENUM ('manual', 'saved_card', 'click_to_pay'); ALTER TABLE payment_attempt ADD COLUMN IF NOT EXISTS card_discovery "CardDiscovery";
42
hyperswitch
migrations/2025-01-13-060852_add_card_discovery_in_payment_attempt/down.sql
.sql
-- This file should undo anything in `up.sql` ALTER TABLE payment_attempt DROP COLUMN IF EXISTS card_discovery; DROP TYPE IF EXISTS "CardDiscovery";
31
hyperswitch
migrations/2023-07-28-111829_update_columns_to_fix_db_diff/up.sql
.sql
ALTER TABLE dispute ALTER COLUMN payment_id TYPE VARCHAR(64); ALTER TABLE payment_methods ALTER COLUMN payment_method_type TYPE VARCHAR(64); ALTER TABLE merchant_account ALTER COLUMN primary_business_details DROP DEFAULT;
43
hyperswitch
migrations/2023-07-28-111829_update_columns_to_fix_db_diff/down.sql
.sql
ALTER TABLE dispute ALTER COLUMN payment_id TYPE VARCHAR(255); ALTER TABLE payment_methods ALTER COLUMN payment_method_type TYPE VARCHAR; ALTER TABLE merchant_account ALTER COLUMN primary_business_details SET DEFAULT '[{"country": "US", "business": "default"}]';
55
hyperswitch
migrations/2024-10-28-125949_add_dispute_currency_column_in_dispute_table/up.sql
.sql
-- Your SQL goes here ALTER TABLE dispute ADD COLUMN IF NOT EXISTS dispute_currency "Currency";
19
hyperswitch
migrations/2024-10-28-125949_add_dispute_currency_column_in_dispute_table/down.sql
.sql
-- This file should undo anything in `up.sql` ALTER TABLE dispute DROP COLUMN IF EXISTS dispute_currency;
21
hyperswitch
migrations/2025-01-03-104019_migrate_permission_group_for_recon/up.sql
.sql
UPDATE roles SET groups = array_replace(groups, 'recon_ops', 'recon_ops_manage') WHERE 'recon_ops' = ANY(groups);
31
hyperswitch
migrations/2025-01-03-104019_migrate_permission_group_for_recon/down.sql
.sql
SELECT 1;
4
hyperswitch
migrations/2023-01-10-035412_connector-metadata-payment-attempt/up.sql
.sql
-- Your SQL goes here ALTER TABLE payment_attempt ADD COLUMN connector_metadata JSONB DEFAULT NULL;
19
hyperswitch
migrations/2023-01-10-035412_connector-metadata-payment-attempt/down.sql
.sql
-- This file should undo anything in `up.sql` ALTER TABLE payment_attempt DROP COLUMN connector_metadata;
20
hyperswitch
migrations/2024-02-27-130532_add_enum_types_to_payment-source_enum/up.sql
.sql
-- Your SQL goes here ALTER TYPE "PaymentSource" ADD VALUE 'webhook'; ALTER TYPE "PaymentSource" ADD VALUE 'external_authenticator';
31
hyperswitch
migrations/2024-02-27-130532_add_enum_types_to_payment-source_enum/down.sql
.sql
-- This file should undo anything in `up.sql` SELECT 1;
15
hyperswitch
migrations/2024-08-08-075600_add_api_version_to_merchant_account/up.sql
.sql
-- Your SQL goes here ALTER TABLE merchant_account ADD COLUMN IF NOT EXISTS version "ApiVersion" NOT NULL DEFAULT 'v1';
28
hyperswitch
migrations/2024-08-08-075600_add_api_version_to_merchant_account/down.sql
.sql
-- This file should undo anything in `up.sql` ALTER TABLE merchant_account DROP COLUMN version;
19
hyperswitch
migrations/2023-10-19-101558_create_routing_algorithm_table/up.sql
.sql
-- Your SQL goes here CREATE TYPE "RoutingAlgorithmKind" AS ENUM ('single', 'priority', 'volume_split', 'advanced'); CREATE TABLE routing_algorithm ( algorithm_id VARCHAR(64) PRIMARY KEY, profile_id VARCHAR(64) NOT NULL, merchant_id VARCHAR(64) NOT NULL, name VARCHAR(64) NOT NULL, description VARC...
156
hyperswitch
migrations/2023-10-19-101558_create_routing_algorithm_table/down.sql
.sql
-- This file should undo anything in `up.sql` DROP TABLE routing_algorithm; DROP TYPE "RoutingAlgorithmKind";
23
hyperswitch
migrations/2023-08-16-103806_add_last_executed_frm_step/up.sql
.sql
alter table fraud_check add column last_step VARCHAR(64) NOT NULL DEFAULT 'processing';
19
hyperswitch
migrations/2023-08-16-103806_add_last_executed_frm_step/down.sql
.sql
alter table fraud_check drop column last_step;
9
hyperswitch
migrations/2025-03-11-171330_add-force-3ds-challenge-in-payment-intent/up.sql
.sql
-- Your SQL goes here ALTER TABLE payment_intent ADD COLUMN IF NOT EXISTS force_3ds_challenge boolean DEFAULT false;
25
hyperswitch
migrations/2025-03-11-171330_add-force-3ds-challenge-in-payment-intent/down.sql
.sql
-- This file should undo anything in `up.sql` ALTER TABLE payment_intent DROP COLUMN IF EXISTS force_3ds_challenge;
26
hyperswitch
migrations/2024-02-05-123412_add_attempt_count_column_to_payouts/up.sql
.sql
-- Your SQL goes here ALTER TABLE payouts ADD COLUMN attempt_count SMALLINT NOT NULL DEFAULT 1; UPDATE payouts SET attempt_count = payout_id_count.count FROM (SELECT payout_id, count(payout_id) FROM payout_attempt GROUP BY payout_id) as payout_id_count WHERE payouts.payout_id = payout_id_count.payout_id;
71
hyperswitch
migrations/2024-02-05-123412_add_attempt_count_column_to_payouts/down.sql
.sql
-- This file should undo anything in `up.sql` ALTER TABLE payouts DROP COLUMN attempt_count;
19
hyperswitch
migrations/2023-12-06-112810_add_intent_fullfilment_time_payment_intent/up.sql
.sql
-- Your SQL goes here ALTER TABLE payment_intent ADD COLUMN IF NOT EXISTS session_expiry TIMESTAMP DEFAULT NULL;
21
hyperswitch
migrations/2023-12-06-112810_add_intent_fullfilment_time_payment_intent/down.sql
.sql
-- This file should undo anything in `up.sql` ALTER TABLE payment_intent DROP COLUMN IF EXISTS session_expiry;
22
hyperswitch
migrations/2024-05-06-105026_user_key_store_table/up.sql
.sql
-- Your SQL goes here CREATE TABLE IF NOT EXISTS user_key_store ( user_id VARCHAR(64) PRIMARY KEY, key bytea NOT NULL, created_at TIMESTAMP NOT NULL DEFAULT now() );
43
hyperswitch
migrations/2024-05-06-105026_user_key_store_table/down.sql
.sql
-- This file should undo anything in `up.sql` DROP TABLE IF EXISTS user_key_store;
19
hyperswitch
migrations/2023-10-19-102636_back_fill_n_remove_connector_response/up.sql
.sql
-- Your SQL goes here ALTER TABLE payment_attempt ADD COLUMN authentication_data JSON, ADD COLUMN encoded_data TEXT; UPDATE payment_attempt SET (authentication_data, encoded_data) = (connector_response.authentication_data, connector_response.encoded_data) from connector_response where payment_attempt.payment_id =...
93
hyperswitch
migrations/2023-10-19-102636_back_fill_n_remove_connector_response/down.sql
.sql
ALTER TABLE payment_attempt DROP COLUMN authentication_data, DROP COLUMN encoded_data;
15
hyperswitch
migrations/2022-12-19-085739_add_attempt_id_to_refund/up.sql
.sql
ALTER TABLE refund ADD COLUMN attempt_id VARCHAR(64) NOT NULL;
15
hyperswitch
migrations/2022-12-19-085739_add_attempt_id_to_refund/down.sql
.sql
ALTER TABLE refund DROP COLUMN attempt_id;
8
hyperswitch
migrations/2023-08-11-073905_add_frm_config_in_mca/up.sql
.sql
ALTER TABLE "merchant_connector_account" ADD COLUMN frm_config jsonb[]; -- Do not run below migration in PROD as this only makes sandbox compatible to PROD version ALTER TABLE merchant_connector_account ALTER COLUMN frm_configs TYPE jsonb USING frm_configs[1]::jsonb;
59
hyperswitch
migrations/2023-08-11-073905_add_frm_config_in_mca/down.sql
.sql
ALTER TABLE "merchant_connector_account" DROP COLUMN frm_config; ALTER TABLE merchant_connector_account ALTER COLUMN frm_configs TYPE jsonb[] USING ARRAY[frm_configs]::jsonb[];
38
hyperswitch
migrations/2024-03-04-204051_events_store_webhook_delivery_attempt_info/up.sql
.sql
-- The following queries must be run before the newer version of the application is deployed. ALTER TABLE events ADD COLUMN merchant_id VARCHAR(64) DEFAULT NULL, ADD COLUMN business_profile_id VARCHAR(64) DEFAULT NULL, ADD COLUMN primary_object_created_at TIMESTAMP DEFAULT NULL, ADD COLUMN idempotent_ev...
281
hyperswitch
migrations/2024-03-04-204051_events_store_webhook_delivery_attempt_info/down.sql
.sql
-- The following queries must be run before the older version of the application is deployed. -- Remove `event_id` as primary key and add unique constraint ALTER TABLE events DROP CONSTRAINT events_pkey; ALTER TABLE events ADD CONSTRAINT event_id_unique UNIQUE (event_id); -- Adding back unused columns, and make `id` ...
163
hyperswitch
migrations/2023-11-24-115538_add_profile_id_payment_link/up.sql
.sql
-- Your SQL goes here ALTER TABLE payment_link ADD COLUMN IF NOT EXISTS profile_id VARCHAR(64) DEFAULT NULL;
26
hyperswitch
migrations/2023-11-24-115538_add_profile_id_payment_link/down.sql
.sql
-- This file should undo anything in `up.sql` ALTER TABLE payment_link DROP COLUMN profile_id;
20
hyperswitch
migrations/2024-07-19-100016_change_primary_key_for_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...
122
hyperswitch
migrations/2024-07-19-100016_change_primary_key_for_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 (id);
33
hyperswitch
migrations/2024-08-21-085916_add_tax_details_in_payment_intent_to_store_tax_amount/up.sql
.sql
-- Your SQL goes here ALTER TABLE payment_intent ADD COLUMN IF NOT EXISTS tax_details JSONB;
20
hyperswitch
migrations/2024-08-21-085916_add_tax_details_in_payment_intent_to_store_tax_amount/down.sql
.sql
-- This file should undo anything in `up.sql` ALTER TABLE payment_intent DROP COLUMN IF EXISTS tax_details;
22
hyperswitch
migrations/2024-09-12-123315_add_network_token_locker_id_and_network_token_payment_method_data_and_network_token_ref_id_in_payment_methods/up.sql
.sql
-- Your SQL goes here ALTER TABLE payment_methods ADD COLUMN IF NOT EXISTS network_token_requestor_reference_id VARCHAR(128) DEFAULT NULL; ALTER TABLE payment_methods ADD COLUMN IF NOT EXISTS network_token_locker_id VARCHAR(64) DEFAULT NULL; ALTER TABLE payment_methods ADD COLUMN IF NOT EXISTS network_token_payment_m...
71
hyperswitch
migrations/2024-09-12-123315_add_network_token_locker_id_and_network_token_payment_method_data_and_network_token_ref_id_in_payment_methods/down.sql
.sql
-- This file should undo anything in `up.sql` ALTER TABLE payment_methods DROP COLUMN IF EXISTS network_token_requestor_reference_id; ALTER TABLE payment_methods DROP COLUMN IF EXISTS network_token_locker_id; ALTER TABLE payment_methods DROP COLUMN IF EXISTS network_token_payment_method_data;
54
hyperswitch
migrations/2023-05-31-152153_add_connector_webhook_details_to_mca/up.sql
.sql
-- Your SQL goes here ALTER TABLE merchant_connector_account ADD COLUMN IF NOT EXISTS connector_webhook_details JSONB DEFAULT NULL;
26
hyperswitch
migrations/2023-05-31-152153_add_connector_webhook_details_to_mca/down.sql
.sql
-- This file should undo anything in `up.sql` ALTER TABLE merchant_connector_account DROP COLUMN connector_webhook_details;
23
hyperswitch
migrations/2024-05-09-130152_collect_shipping_details_from_wallet_connector/up.sql
.sql
-- Your SQL goes here ALTER TABLE business_profile ADD COLUMN IF NOT EXISTS collect_shipping_details_from_wallet_connector BOOLEAN DEFAULT FALSE;
25
hyperswitch
migrations/2024-05-09-130152_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 collect_shipping_details_from_wallet_connector;
26
hyperswitch
migrations/2024-12-02-110129_update-user-role-entity-type/up.sql
.sql
-- Your SQL goes here -- Incomplete migration, also run migrations/2024-12-13-080558_entity-id-backfill-for-user-roles UPDATE user_roles SET entity_type = CASE WHEN role_id = 'org_admin' THEN 'organization' ELSE 'merchant' END WHERE version = 'v1' AND entity_type IS NULL;
90
hyperswitch
migrations/2024-12-02-110129_update-user-role-entity-type/down.sql
.sql
-- This file should undo anything in `up.sql` UPDATE user_roles SET entity_type = NULL WHERE version = 'v1';
26
hyperswitch
migrations/2023-10-31-070509_add_payment_link_config_in_payment_link_db/up.sql
.sql
-- Your SQL goes here ALTER TABLE payment_link ADD COLUMN IF NOT EXISTS payment_link_config JSONB NULL;
22
hyperswitch
migrations/2023-10-31-070509_add_payment_link_config_in_payment_link_db/down.sql
.sql
-- This file should undo anything in `up.sql` ALTER TABLE payment_link DROP COLUMN IF EXISTS payment_link_config;
23
hyperswitch
migrations/2023-09-18-104900_add_pm_auth_config_mca/up.sql
.sql
-- Your SQL goes here ALTER TABLE merchant_connector_account ADD COLUMN IF NOT EXISTS pm_auth_config JSONB DEFAULT NULL; ALTER TYPE "ConnectorType" ADD VALUE 'payment_method_auth';
37
hyperswitch
migrations/2023-09-18-104900_add_pm_auth_config_mca/down.sql
.sql
-- This file should undo anything in `up.sql` ALTER TABLE merchant_connector_account DROP COLUMN IF EXISTS pm_auth_config;
24
hyperswitch
migrations/2023-12-06-060216_change_primary_key_for_mca/up.sql
.sql
-- Your SQL goes here ALTER TABLE merchant_connector_account ADD UNIQUE (profile_id, connector_label); DROP INDEX IF EXISTS "merchant_connector_account_profile_id_connector_id_index";
35
hyperswitch
migrations/2023-12-06-060216_change_primary_key_for_mca/down.sql
.sql
-- This file should undo anything in `up.sql` CREATE UNIQUE INDEX IF NOT EXISTS "merchant_connector_account_profile_id_connector_id_index" ON merchant_connector_account (profile_id, connector_name); ALTER TABLE merchant_connector_account DROP CONSTRAINT IF EXISTS "merchant_connector_account_profile_id_connector_label_...
57
hyperswitch
migrations/2024-11-06-121933_setup-themes-table/up.sql
.sql
-- Your SQL goes here CREATE TABLE IF NOT EXISTS themes ( theme_id VARCHAR(64) PRIMARY KEY, tenant_id VARCHAR(64) NOT NULL, org_id VARCHAR(64), merchant_id VARCHAR(64), profile_id VARCHAR(64), created_at TIMESTAMP NOT NULL, last_modified_at TIMESTAMP NOT NULL ); CREATE UNIQUE INDEX IF NOT E...
122
hyperswitch
migrations/2024-11-06-121933_setup-themes-table/down.sql
.sql
-- This file should undo anything in `up.sql` DROP INDEX IF EXISTS themes_index; DROP TABLE IF EXISTS themes;
24
hyperswitch
migrations/2023-12-11-075542_create_pm_fingerprint_table/up.sql
.sql
-- Your SQL goes here CREATE TYPE "BlocklistDataKind" AS ENUM ( 'payment_method', 'card_bin', 'extended_card_bin' ); CREATE TABLE blocklist_fingerprint ( id SERIAL PRIMARY KEY, merchant_id VARCHAR(64) NOT NULL, fingerprint_id VARCHAR(64) NOT NULL, data_kind "BlocklistDataKind" NOT NULL, encrypte...
124
hyperswitch
migrations/2023-12-11-075542_create_pm_fingerprint_table/down.sql
.sql
-- This file should undo anything in `up.sql` DROP TABLE blocklist_fingerprint; DROP TYPE "BlocklistDataKind";
26
hyperswitch
migrations/2024-07-15-143920_change_primary_key_for_mandate/up.sql
.sql
-- Your SQL goes here -- The below query will lock the mandate 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 mandate -- This query should be run only after...
107
hyperswitch
migrations/2024-07-15-143920_change_primary_key_for_mandate/down.sql
.sql
ALTER TABLE mandate DROP CONSTRAINT mandate_pkey; ALTER TABLE mandate ADD PRIMARY KEY (id);
18
hyperswitch
migrations/2023-10-19-071731_add_connector_id_to_payment_attempt/up.sql
.sql
-- Your SQL goes here -- The type is VARCHAR(32) as this will store the merchant_connector_account id -- which will be generated by the application using default length ALTER TABLE payment_attempt ADD COLUMN IF NOT EXISTS merchant_connector_id VARCHAR(32);
55
hyperswitch
migrations/2023-10-19-071731_add_connector_id_to_payment_attempt/down.sql
.sql
-- This file should undo anything in `up.sql` ALTER TABLE payment_attempt DROP COLUMN IF EXISTS connector_id;
22
hyperswitch
migrations/2024-06-12-060604_add_customer_details_in_payment_intent/up.sql
.sql
-- Your SQL goes here ALTER TABLE payment_intent ADD COLUMN IF NOT EXISTS customer_details BYTEA DEFAULT NULL;
22
hyperswitch
migrations/2024-06-12-060604_add_customer_details_in_payment_intent/down.sql
.sql
-- This file should undo anything in `up.sql` ALTER TABLE payment_intent DROP COLUMN IF EXISTS customer_details;
22
hyperswitch
migrations/2023-04-21-100150_create_index_for_api_keys/up.sql
.sql
CREATE UNIQUE INDEX api_keys_merchant_id_key_id_index ON api_keys (merchant_id, key_id);
21
hyperswitch
migrations/2023-04-21-100150_create_index_for_api_keys/down.sql
.sql
DROP INDEX api_keys_merchant_id_key_id_index;
11
hyperswitch
migrations/2024-11-28-103344_add_split_refunds/up.sql
.sql
-- Your SQL goes here ALTER TABLE refund ADD COLUMN IF NOT EXISTS split_refunds jsonb;
20
hyperswitch
migrations/2024-11-28-103344_add_split_refunds/down.sql
.sql
-- This file should undo anything in `up.sql` ALTER TABLE refund DROP COLUMN IF EXISTS split_refunds;
22
hyperswitch
migrations/2023-11-07-110139_add_gsm_table/up.sql
.sql
-- Your SQL goes here -- Tables CREATE TABLE IF NOT EXISTS gateway_status_map ( connector VARCHAR(64) NOT NULL, flow VARCHAR(64) NOT NULL, sub_flow VARCHAR(64) NOT NULL, code VARCHAR(255) NOT NULL, message VARCHAR(1024), status VARCHAR(64) NOT NULL, router_error VARCHAR(64), decision VAR...
149
hyperswitch
migrations/2023-11-07-110139_add_gsm_table/down.sql
.sql
-- Tables DROP TABLE gateway_status_map;
9
hyperswitch
migrations/2024-03-11-102743_add_additional_authentication_fields/up.sql
.sql
-- Your SQL goes here ALTER TABLE authentication ADD COLUMN IF NOT EXISTS maximum_supported_version JSONB, ADD COLUMN IF NOT EXISTS threeds_server_transaction_id VARCHAR(64), ADD COLUMN IF NOT EXISTS cavv VARCHAR(64), ADD COLUMN IF NOT EXISTS authentication_flow_type VARCHAR(64), ADD COLUMN IF NOT EXISTS message_versio...
221
hyperswitch
migrations/2024-03-11-102743_add_additional_authentication_fields/down.sql
.sql
-- This file should undo anything in `up.sql` ALTER TABLE authentication DROP COLUMN IF EXISTS maximum_supported_version , DROP COLUMN IF EXISTS threeds_server_transaction_id , DROP COLUMN IF EXISTS cavv , DROP COLUMN IF EXISTS authentication_flow_type , DROP COLUMN IF EXISTS message_version , DROP COLUMN IF EXISTS eci...
159
hyperswitch
migrations/2023-08-08-144148_add_business_profile_table/up.sql
.sql
-- Your SQL goes here CREATE TABLE IF NOT EXISTS business_profile ( profile_id VARCHAR(64) PRIMARY KEY, merchant_id VARCHAR(64) NOT NULL, profile_name VARCHAR(64) NOT NULL, created_at TIMESTAMP NOT NULL, modified_at TIMESTAMP NOT NULL, return_url TEXT, enable_payment_response_hash BOOLEAN NO...
154
hyperswitch
migrations/2023-08-08-144148_add_business_profile_table/down.sql
.sql
-- This file should undo anything in `up.sql` DROP TABLE IF EXISTS business_profile;
18
hyperswitch
migrations/2025-02-11-062329_add-product-type-column-merchant-account/up.sql
.sql
-- Your SQL goes here ALTER TABLE merchant_account ADD COLUMN IF NOT EXISTS product_type VARCHAR(64);
23
hyperswitch
migrations/2025-02-11-062329_add-product-type-column-merchant-account/down.sql
.sql
-- This file should undo anything in `up.sql` ALTER TABLE merchant_account DROP product_type;
19
hyperswitch
migrations/2025-02-06-111828_drop_int_id_column_accross_database/up.sql
.sql
-- This file contains queries to re-create the `id` column as a `VARCHAR` column instead of `SERIAL` column for tables that already have it. -- It must be ensured that the deployed version of the application does not include the `id` column in any of its queries. -- Drop the id column as this will be used later as the ...
274
hyperswitch
migrations/2025-02-06-111828_drop_int_id_column_accross_database/down.sql
.sql
-- This file contains queries to re-create the `id` column as a `VARCHAR(64)` column for tables that had it removed. -- It must be ensured that the deployed version of the application includes the `id` column in any of its queries. -- Re-create the id column as this was used as the primary key with a different type ---...
297
hyperswitch
migrations/2023-11-06-110233_create_user_table/up.sql
.sql
-- Your SQL goes here CREATE TABLE IF NOT EXISTS users ( id SERIAL PRIMARY KEY, user_id VARCHAR(64) NOT NULL UNIQUE, email VARCHAR(255) NOT NULL UNIQUE, name VARCHAR(255) NOT NULL, password VARCHAR(255) NOT NULL, is_verified bool NOT NULL DEFAULT false, created_at TIMESTAMP NOT NULL DEFAULT ...
123
hyperswitch
migrations/2023-11-06-110233_create_user_table/down.sql
.sql
-- This file should undo anything in `up.sql` DROP TABLE users;
15
hyperswitch
migrations/2023-04-05-121040_alter_mca_change_country_to_enum/up.sql
.sql
ALTER TABLE merchant_connector_account ALTER COLUMN business_country TYPE "CountryCode" USING business_country::"CountryCode";
23
hyperswitch
migrations/2023-04-05-121040_alter_mca_change_country_to_enum/down.sql
.sql
ALTER TABLE merchant_connector_account ALTER COLUMN business_country TYPE VARCHAR(2);
15
hyperswitch
migrations/2024-09-05-155712_add_new_variant_in_routing_algorithm_kind_type/up.sql
.sql
-- Your SQL goes here ALTER TYPE "RoutingAlgorithmKind" ADD VALUE 'dynamic';
18
hyperswitch
migrations/2024-09-05-155712_add_new_variant_in_routing_algorithm_kind_type/down.sql
.sql
-- This file should undo anything in `up.sql` DELETE FROM pg_enum WHERE enumlabel = 'dynamic' AND enumtypid = ( SELECT oid FROM pg_type WHERE typname = 'RoutingAlgorithmKind' );
45
hyperswitch
migrations/2024-02-14-092225_create_roles_table/up.sql
.sql
-- Your SQL goes here CREATE TYPE "RoleScope" AS ENUM ('merchant','organization'); CREATE TABLE IF NOT EXISTS roles ( id SERIAL PRIMARY KEY, role_name VARCHAR(64) NOT NULL, role_id VARCHAR(64) NOT NULL UNIQUE, merchant_id VARCHAR(64) NOT NULL, org_id VARCHAR(64) NOT NULL, groups TEXT[] NOT NULL...
167
hyperswitch
migrations/2024-02-14-092225_create_roles_table/down.sql
.sql
-- This file should undo anything in `up.sql` DROP INDEX IF EXISTS role_id_index; DROP INDEX IF EXISTS roles_merchant_org_index; DROP TABLE IF EXISTS roles; DROP TYPE "RoleScope";
41
hyperswitch
migrations/2022-12-14-092540_i32_to_i64/up.sql
.sql
-- Your SQL goes here ALTER TABLE mandate ALTER COLUMN mandate_amount TYPE bigint, ALTER COLUMN amount_captured TYPE bigint; ALTER TABLE payment_attempt ALTER COLUMN amount TYPE bigint, ALTER COLUMN offer_amount TYPE bigint, ALTER COLUMN surcharge_amount TYPE bigint, ALTER COLUMN tax_amount TYP...
114
hyperswitch
migrations/2022-12-14-092540_i32_to_i64/down.sql
.sql
-- This file should undo anything in `up.sql` ALTER TABLE mandate ALTER COLUMN mandate_amount TYPE integer, ALTER COLUMN amount_captured TYPE integer; ALTER TABLE payment_attempt ALTER COLUMN amount TYPE integer, ALTER COLUMN offer_amount TYPE integer, ALTER COLUMN surcharge_amount TYPE integer, ...
119
hyperswitch
migrations/2025-02-18-091645_add_api_version_for_process_tracker/up.sql
.sql
-- Your SQL goes here ALTER TABLE process_tracker ADD COLUMN IF NOT EXISTS version "ApiVersion" NOT NULL DEFAULT 'v1';
32
hyperswitch
migrations/2025-02-18-091645_add_api_version_for_process_tracker/down.sql
.sql
-- This file should undo anything in `up.sql` ALTER TABLE process_tracker DROP COLUMN version;
21
hyperswitch
migrations/2023-09-07-113914_add_amount_capturable_field_payment_attempt/up.sql
.sql
-- Your SQL goes here ALTER TABLE payment_attempt ADD COLUMN IF NOT EXISTS amount_capturable BIGINT NOT NULL DEFAULT 0;
28
hyperswitch
migrations/2023-09-07-113914_add_amount_capturable_field_payment_attempt/down.sql
.sql
-- This file should undo anything in `up.sql` ALTER TABLE payment_attempt DROP COLUMN amount_capturable;
23