repo stringclasses 4
values | file_path stringlengths 6 193 | extension stringclasses 23
values | content stringlengths 0 1.73M | token_count int64 0 724k | __index_level_0__ int64 0 10.8k |
|---|---|---|---|---|---|
hyperswitch | Dockerfile | none | FROM rust:bookworm as builder
ARG EXTRA_FEATURES=""
ARG VERSION_FEATURE_SET="v1"
RUN apt-get update \
&& apt-get install -y libpq-dev libssl-dev pkg-config protobuf-compiler
# Copying codebase from current dir to /router dir
# and creating a fresh build
WORKDIR /router
# Disable incremental compilation.
#
# Inc... | 632 | 0 |
hyperswitch | generate_code_coverage.sh | .sh | #! /bin/bash
COV_PROGRAM="grcov"
INSTALL_COV_PROGRAM="cargo install grcov"
SERVER_PORT=8000
SERVER="python3"
command -v $COV_PROGRAM >/dev/null 2>&1 || { echo -e >&2 "Require \"$COV_PROGRAM\" but it's not installed.\nInstall using \"$INSTALL_COV_PROGRAM\" and restart.\nAborting."; exit 1; }
command -v $SERVER >/dev/n... | 227 | 1 |
hyperswitch | add_connector.md | .md | # Guide to Integrate a Connector
## Introduction
This is a guide to contributing new connector to Router. This guide includes instructions on checking out the source code, integrating and testing the new connector, and finally contributing the new connector back to the project.
## Prerequisites
- Understanding of t... | 8,108 | 2 |
hyperswitch | justfile | none | # List available recipes
list:
@just --list --justfile {{ source_file() }}
fmt_flags := '--all'
# Run formatter
fmt *FLAGS:
cargo +nightly fmt {{ fmt_flags }} {{ FLAGS }}
check_flags := '--all-targets'
v2_lints:= '-D warnings -Aunused -Aclippy::todo -Aclippy::diverging_sub_expression'
alias c := check
# Ch... | 2,305 | 3 |
hyperswitch | INSTALL_dependencies.sh | .sh | #!/usr/bin/env bash
#
# Description: One click install for hyperswitch router
#
#
# Global config
if [[ "${TRACE-0}" == "1" ]]; then
set -o xtrace
fi
RUST_MSRV="1.80.0"
_DB_NAME="hyperswitch_db"
_DB_USER="db_user"
_DB_PASS="db_password"
OSTYPE=${OSTYPE:-}
PRE_INSTALL_MSG="Dependency install script.\n
The script... | 2,100 | 4 |
hyperswitch | NOTICE | none | hyperswitch
Copyright 2022-2023 Juspay Technologies Private Limited
This product includes software developed at
Juspay Technologies Private Limited (https://hyperswitch.io/)
| 43 | 5 |
hyperswitch | package.json | .json | {
"name": "hyperswitch",
"version": "0.0.0",
"private": true,
"description": "This is just to run automated newman tests for this service",
"devDependencies": {
"newman": "git+ssh://git@github.com:knutties/newman.git#7106e194c15d49d066fa09d9a2f18b2238f3dba8"
}
}
| 114 | 6 |
hyperswitch | Cargo.toml | .toml | [workspace]
resolver = "2"
members = ["crates/*"]
package.edition = "2021"
package.rust-version = "1.80.0"
package.license = "Apache-2.0"
[workspace.dependencies]
tracing = { version = "0.1.40" }
# Most of the lint configuration is based on https://github.com/EmbarkStudios/rust-ecosystem/blob/main/lints.toml
[workspa... | 420 | 7 |
hyperswitch | CHANGELOG.md | .md | # Changelog
All notable changes to HyperSwitch will be documented here.
- - -
## 2025.04.09.0-hotfix7
### Miscellaneous Tasks
- **analytics:** Opensearch client creation based on config ([#7881](https://github.com/juspay/hyperswitch/pull/7881)) ([`a387bd4`](https://github.com/juspay/hyperswitch/commit/a387bd4711a1... | 398,171 | 8 |
hyperswitch | LICENSE | none |
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
... | 2,273 | 9 |
hyperswitch | docker-compose-development.yml | .yml | version: "3.8"
volumes:
cargo_cache:
pg_data:
router_build_cache:
scheduler_build_cache:
drainer_build_cache:
redisinsight_store:
networks:
router_net:
services:
### Dependencies
pg:
image: postgres:latest
ports:
- "5432:5432"
networks:
- router_net
volumes:
- pg_d... | 2,281 | 10 |
hyperswitch | diesel_v2.toml | .toml | # For documentation on how to configure this file,
# see diesel.rs/guides/configuring-diesel-cli
# use a separate file for schema of api v2
[print_schema]
file = "crates/diesel_models/src/schema_v2.rs"
import_types = ["diesel::sql_types::*", "crate::enums::diesel_exports::*"]
generate_missing_sql_type_definitions = fa... | 82 | 11 |
hyperswitch | add_connector_updated.md | .md | # Guide to Integrating a Connector
## Table of Contents
1. [Introduction](#introduction)
2. [Prerequisites](#prerequisites)
3. [Understanding Connectors and Payment Methods](#understanding-connectors-and-payment-methods)
4. [Integration Steps](#integration-steps)
- [Generate Template](#generate-template)
- [Imp... | 5,665 | 12 |
hyperswitch | README.md | .md | <p align="center">
<img src="./docs/imgs/hyperswitch-logo-dark.svg#gh-dark-mode-only" alt="Hyperswitch-Logo" width="40%" />
<img src="./docs/imgs/hyperswitch-logo-light.svg#gh-light-mode-only" alt="Hyperswitch-Logo" width="40%" />
</p>
<h1 align="center">Open-Source Payments Orchestration</h1>
<div align="center"... | 2,803 | 13 |
hyperswitch | flake.nix | .nix | {
description = "hyperswitch";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
# TODO: Move away from these to https://github.com/juspay/rust-flake
cargo2nix.url = "github:cargo2nix/cargo2nix/release-0.11.0";
rust-overlay.url ... | 626 | 14 |
hyperswitch | Makefile | none | # = Parameters
# Override envars using -e
#
# = Common
#
# Checks two given strings for equality.
eq = $(if $(or $(1),$(2)),$(and $(findstring $(1),$(2)),\
$(findstring $(2),$(1))),1)
ROOT_DIR_WITH_SLASH := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
ROOT_DIR := $(realpath $(ROOT... | 585 | 15 |
hyperswitch | package-lock.json | .json | {
"name": "hyperswitch",
"version": "0.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@colors/colors": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz",
"integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYH... | 21,806 | 16 |
hyperswitch | diesel.toml | .toml | # For documentation on how to configure this file,
# see diesel.rs/guides/configuring-diesel-cli
[print_schema]
file = "crates/diesel_models/src/schema.rs"
import_types = ["diesel::sql_types::*", "crate::enums::diesel_exports::*"]
generate_missing_sql_type_definitions = false
patch_file="crates/diesel_models/drop_id.p... | 81 | 17 |
hyperswitch | cog.toml | .toml | tag_prefix = "v"
ignore_merge_commits = true
# the HTML comments (`<!-- N -->`) are a workaround to have sections in custom order, since they are alphabetically sorted
[commit_types]
feat = { changelog_title = "<!-- 0 -->Features" }
fix = { changelog_title = "<!-- 1 -->Bug Fixes" }
perf = { changelog_title = "<!-- 2 -... | 232 | 18 |
hyperswitch | docker-compose.yml | .yml | volumes:
pg_data:
redisinsight_store:
ckh_data:
networks:
router_net:
services:
### Dependencies
prestart-hook:
image: curlimages/curl-base:latest
container_name: prestart-hook
entrypoint:
[
"/bin/sh",
"-c",
"apk add --no-cache bash && /bin/bash /prestart_hook.sh"... | 3,534 | 19 |
hyperswitch | migrations/2024-05-30-105524_add_payout_link_id_in_payouts/up.sql | .sql | -- Your SQL goes here
ALTER TABLE payouts ADD COLUMN IF NOT EXISTS payout_link_id VARCHAR(255); | 23 | 20 |
hyperswitch | migrations/2024-05-30-105524_add_payout_link_id_in_payouts/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE payouts DROP COLUMN IF EXISTS payout_link_id; | 22 | 21 |
hyperswitch | migrations/2024-05-21-075556_add_directory_server_id_in_authentication/up.sql | .sql | -- Your SQL goes here
ALTER TABLE authentication ADD COLUMN IF NOT EXISTS directory_server_id VARCHAR(128); | 23 | 22 |
hyperswitch | migrations/2024-05-21-075556_add_directory_server_id_in_authentication/down.sql | .sql | ALTER TABLE authentication DROP COLUMN IF EXISTS directory_server_id; | 11 | 23 |
hyperswitch | migrations/2025-03-04-053541_add_api_version_to_organization/up.sql | .sql | -- Your SQL goes here
ALTER TABLE organization
ADD COLUMN IF NOT EXISTS version "ApiVersion" NOT NULL DEFAULT 'v1'; | 27 | 24 |
hyperswitch | migrations/2025-03-04-053541_add_api_version_to_organization/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE organization DROP COLUMN version;
| 18 | 25 |
hyperswitch | migrations/2024-05-06-065226_add_billing_config_to_business_profile/up.sql | .sql | -- Your SQL goes here
ALTER TABLE business_profile
ADD COLUMN IF NOT EXISTS use_billing_as_payment_method_billing BOOLEAN DEFAULT TRUE;
| 26 | 26 |
hyperswitch | migrations/2024-05-06-065226_add_billing_config_to_business_profile/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE business_profile DROP COLUMN IF EXISTS use_billing_as_payment_method_billing;
| 26 | 27 |
hyperswitch | migrations/2023-11-06-153840_introduce_new_attempt_and_intent_status/up.sql | .sql | -- Your SQL goes here
ALTER TYPE "IntentStatus" ADD VALUE IF NOT EXISTS 'partially_captured_and_capturable';
ALTER TYPE "AttemptStatus" ADD VALUE IF NOT EXISTS 'partial_charged_and_chargeable'; | 46 | 28 |
hyperswitch | migrations/2023-11-06-153840_introduce_new_attempt_and_intent_status/down.sql | .sql | -- This file should undo anything in `up.sql`
SELECT 1; | 15 | 29 |
hyperswitch | migrations/2023-04-12-075449_separate_payment_attempt_algorithm_col/up.sql | .sql | -- Your SQL goes here
ALTER TABLE payment_attempt
ADD COLUMN straight_through_algorithm JSONB;
UPDATE payment_attempt SET straight_through_algorithm = connector->'algorithm'
WHERE connector->>'algorithm' IS NOT NULL;
ALTER TABLE payment_attempt
ALTER COLUMN connector TYPE VARCHAR(64)
USING connector->>'routed_through... | 65 | 30 |
hyperswitch | migrations/2023-04-12-075449_separate_payment_attempt_algorithm_col/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE payment_attempt
ALTER COLUMN connector TYPE JSONB
USING jsonb_build_object(
'routed_through', connector,
'algorithm', straight_through_algorithm
);
ALTER TABLE payment_attempt DROP COLUMN straight_through_algorithm;
| 57 | 31 |
hyperswitch | migrations/2023-10-25-070909_add_merchant_custom_name_payment_link/up.sql | .sql | -- Your SQL goes here
ALTER TABLE payment_link ADD COLUMN custom_merchant_name VARCHAR(64); | 21 | 32 |
hyperswitch | migrations/2023-10-25-070909_add_merchant_custom_name_payment_link/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE payment_link DROP COLUMN custom_merchant_name;
| 22 | 33 |
hyperswitch | migrations/2024-06-03-090859_make_id_as_optional_for_payments/up.sql | .sql | -- First drop the primary key of payment_intent
ALTER TABLE payment_intent DROP CONSTRAINT payment_intent_pkey;
-- Create new primary key
ALTER TABLE payment_intent
ADD PRIMARY KEY (payment_id, merchant_id);
-- Make the previous primary key as optional
ALTER TABLE payment_intent
ALTER COLUMN id DROP NOT NULL;
-- Fol... | 112 | 34 |
hyperswitch | migrations/2024-06-03-090859_make_id_as_optional_for_payments/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE payment_attempt
ALTER COLUMN id
SET NOT NULL;
ALTER TABLE payment_attempt DROP CONSTRAINT payment_attempt_pkey;
ALTER TABLE payment_attempt
ADD PRIMARY KEY (id);
ALTER TABLE payment_intent
ALTER COLUMN id
SET NOT NULL;
ALTER TABLE payment_intent DROP CONSTRA... | 81 | 35 |
hyperswitch | migrations/2024-12-11-092624_add-email-domain-in-auth-methods/up.sql | .sql | -- Your SQL goes here
ALTER TABLE user_authentication_methods ADD COLUMN email_domain VARCHAR(64);
UPDATE user_authentication_methods SET email_domain = auth_id WHERE email_domain IS NULL;
ALTER TABLE user_authentication_methods ALTER COLUMN email_domain SET NOT NULL;
CREATE INDEX email_domain_index ON user_authentica... | 62 | 36 |
hyperswitch | migrations/2024-12-11-092624_add-email-domain-in-auth-methods/down.sql | .sql | -- This file should undo anything in `up.sql`
DROP INDEX email_domain_index;
ALTER TABLE user_authentication_methods DROP COLUMN email_domain;
| 27 | 37 |
hyperswitch | migrations/2024-12-24-115958_add-unified-code-and-message-in-refunds/up.sql | .sql | -- Your SQL goes here
ALTER TABLE refund
ADD COLUMN IF NOT EXISTS unified_code VARCHAR(255) DEFAULT NULL,
ADD COLUMN IF NOT EXISTS unified_message VARCHAR(1024) DEFAULT NULL; | 43 | 38 |
hyperswitch | migrations/2024-12-24-115958_add-unified-code-and-message-in-refunds/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE refund DROP COLUMN IF EXISTS unified_code;
ALTER TABLE refund DROP COLUMN IF EXISTS unified_message; | 31 | 39 |
hyperswitch | migrations/2023-04-20-073704_allow_multiple_mandate_ids/up.sql | .sql | ALTER TABLE mandate
ADD COLUMN connector_mandate_ids jsonb;
UPDATE mandate SET connector_mandate_ids = jsonb_build_object(
'mandate_id', connector_mandate_id,
'payment_method_id', NULL
); | 51 | 40 |
hyperswitch | migrations/2023-04-20-073704_allow_multiple_mandate_ids/down.sql | .sql | ALTER TABLE mandate DROP COLUMN connector_mandate_ids; | 11 | 41 |
hyperswitch | migrations/2024-02-21-143530_add_default_payment_method_in_customers/up.sql | .sql | -- Your SQL goes here
ALTER TABLE customers
ADD COLUMN IF NOT EXISTS default_payment_method_id VARCHAR(64); | 24 | 42 |
hyperswitch | migrations/2024-02-21-143530_add_default_payment_method_in_customers/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE customers DROP COLUMN IF EXISTS default_payment_method;
| 22 | 43 |
hyperswitch | migrations/2023-04-05-051523_add_business_sub_label_to_payment_attempt/up.sql | .sql | ALTER TABLE payment_attempt
ADD COLUMN IF NOT EXISTS business_sub_label VARCHAR(64);
| 18 | 44 |
hyperswitch | migrations/2023-04-05-051523_add_business_sub_label_to_payment_attempt/down.sql | .sql | ALTER TABLE payment_attempt DROP COLUMN IF EXISTS business_sub_label;
| 12 | 45 |
hyperswitch | migrations/2024-06-04-140449_create_index_for_connector_payout_id_and_merchant_id_in_payout_attempt/up.sql | .sql | CREATE INDEX connector_payout_id_merchant_id_index ON payout_attempt (connector_payout_id, merchant_id); | 22 | 46 |
hyperswitch | migrations/2024-06-04-140449_create_index_for_connector_payout_id_and_merchant_id_in_payout_attempt/down.sql | .sql | DROP INDEX IF EXISTS connector_payout_id_merchant_id_index; | 13 | 47 |
hyperswitch | migrations/2024-09-24-105659_alter_entity_type_internal_to_merchant/up.sql | .sql | -- Your SQL goes here
UPDATE user_roles SET entity_type = 'merchant' WHERE entity_type = 'internal'; | 23 | 48 |
hyperswitch | migrations/2024-09-24-105659_alter_entity_type_internal_to_merchant/down.sql | .sql | -- This file should undo anything in `up.sql`
UPDATE user_roles SET entity_type = 'internal' where role_id like 'internal%' and version = 'v2';
| 35 | 49 |
hyperswitch | migrations/2023-09-08-134514_add_payment_confirm_source_in_payment_intent/up.sql | .sql | -- Your SQL goes here
CREATE TYPE "PaymentSource" AS ENUM (
'merchant_server',
'postman',
'dashboard',
'sdk'
);
ALTER TABLE payment_intent
ADD COLUMN IF NOT EXISTS payment_confirm_source "PaymentSource"; | 51 | 50 |
hyperswitch | migrations/2023-09-08-134514_add_payment_confirm_source_in_payment_intent/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE payment_intent
DROP COLUMN IF EXISTS payment_confirm_source;
DROP TYPE "PaymentSource"; | 30 | 51 |
hyperswitch | migrations/2023-02-10-083146_make_payment_method_type_as_text/up.sql | .sql | -- Your SQL goes here
ALTER TABLE payment_methods
ALTER COLUMN payment_method_type TYPE VARCHAR(64);
ALTER TABLE payment_attempt
ADD COLUMN payment_method_type VARCHAR(64);
DROP TYPE IF EXISTS "PaymentMethodSubType";
| 47 | 52 |
hyperswitch | migrations/2023-02-10-083146_make_payment_method_type_as_text/down.sql | .sql | -- This file should undo anything in `up.sql`
CREATE TYPE "PaymentMethodSubType" AS ENUM (
'credit',
'debit',
'upi_intent',
'upi_collect',
'credit_card_installments',
'pay_later_installments'
);
ALTER TABLE payment_attempt DROP COLUMN payment_method_type;
ALTER TABLE payment_methods
ALTER COLU... | 96 | 53 |
hyperswitch | migrations/2024-02-15-153757_add_dashboard_metadata_enum_is_change_password_required/up.sql | .sql | -- Your SQL goes here
ALTER TYPE "DashboardMetadata" ADD VALUE IF NOT EXISTS 'is_change_password_required'; | 23 | 54 |
hyperswitch | migrations/2024-02-15-153757_add_dashboard_metadata_enum_is_change_password_required/down.sql | .sql | -- This file should undo anything in `up.sql`
SELECT 1; | 15 | 55 |
hyperswitch | migrations/2024-03-07-102620_add-network-transaction-id/up.sql | .sql | -- Your SQL goes here
ALTER TABLE payment_methods ADD COLUMN network_transaction_id VARCHAR(255) DEFAULT NULL; | 24 | 56 |
hyperswitch | migrations/2024-03-07-102620_add-network-transaction-id/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE payment_methods DROP COLUMN network_transaction_id; | 21 | 57 |
hyperswitch | migrations/2023-04-05-121047_alter_pi_change_country_to_enum/up.sql | .sql | ALTER TABLE payment_intent
ALTER COLUMN business_country DROP DEFAULT,
ALTER COLUMN business_country TYPE "CountryCode" USING business_country::"CountryCode";
| 30 | 58 |
hyperswitch | migrations/2023-04-05-121047_alter_pi_change_country_to_enum/down.sql | .sql | ALTER TABLE payment_intent
ALTER COLUMN business_country TYPE VARCHAR(2);
| 14 | 59 |
hyperswitch | migrations/2023-03-27-091611_change_country_to_enum/up.sql | .sql | CREATE TYPE "CountryCode" AS ENUM (
'AF',
'AX',
'AL',
'DZ',
'AS',
'AD',
'AO',
'AI',
'AQ',
'AG',
'AR',
'AM',
'AW',
'AU',
'AT',
'AZ',
'BS',
'BH',
'BD',
'BB',
'BY',
'BE',
'BZ',
'BJ',
'BM',
'BT',
'BO',
'BQ',
... | 1,036 | 60 |
hyperswitch | migrations/2023-03-27-091611_change_country_to_enum/down.sql | .sql | ALTER TABLE address
ALTER COLUMN country TYPE VARCHAR(255);
DROP TYPE IF EXISTS "CountryCode";
| 22 | 61 |
hyperswitch | migrations/2023-12-07-075240_make-request-incremental-auth-optional-intent/up.sql | .sql | -- Your SQL goes here
ALTER TABLE payment_intent ALTER COLUMN request_incremental_authorization DROP NOT NULL; | 21 | 62 |
hyperswitch | migrations/2023-12-07-075240_make-request-incremental-auth-optional-intent/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE payment_intent ALTER COLUMN request_incremental_authorization SET NOT NULL; | 26 | 63 |
hyperswitch | migrations/2024-01-29-100008_routing_info_for_payout_attempts/up.sql | .sql | -- Your SQL goes here
ALTER TABLE payout_attempt
ALTER COLUMN connector TYPE JSONB USING jsonb_build_object (
'routed_through', connector, 'algorithm', NULL
);
ALTER TABLE payout_attempt ADD COLUMN routing_info JSONB;
UPDATE payout_attempt
SET
routing_info = connector -> 'algorithm'
WHERE
connector ->> 'a... | 158 | 64 |
hyperswitch | migrations/2024-01-29-100008_routing_info_for_payout_attempts/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE payout_attempt
ALTER COLUMN connector TYPE JSONB USING jsonb_build_object (
'routed_through', connector, 'algorithm', routing_info
);
ALTER TABLE payout_attempt DROP COLUMN routing_info;
ALTER TABLE payout_attempt ALTER COLUMN connector SET NOT NULL;
ALT... | 78 | 65 |
hyperswitch | migrations/2024-08-26-043046_add-card-network-field-for-pa/up.sql | .sql | -- Your SQL goes here
ALTER TABLE payment_attempt ADD COLUMN card_network VARCHAR(32);
UPDATE payment_attempt
SET card_network = (payment_method_data -> 'card' -> 'card_network')::VARCHAR(32); | 46 | 66 |
hyperswitch | migrations/2024-08-26-043046_add-card-network-field-for-pa/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE payment_attempt DROP COLUMN card_network; | 20 | 67 |
hyperswitch | migrations/2024-01-22-091431_create_authentication_table/up.sql | .sql | CREATE TABLE IF NOT EXISTS authentication (
authentication_id VARCHAR(64) NOT NULL,
merchant_id VARCHAR(64) NOT NULL,
authentication_connector VARCHAR(64) NOT NULL,
connector_authentication_id VARCHAR(64),
authentication_data JSONB,
payment_method_id VARCHAR(64) NOT NULL,
authentication_type... | 149 | 68 |
hyperswitch | migrations/2024-01-22-091431_create_authentication_table/down.sql | .sql | -- This file should undo anything in `up.sql`
DROP TABLE IF EXISTS authentication;
| 17 | 69 |
hyperswitch | migrations/2025-01-07-105739_create_index_for_relay/up.sql | .sql | -- Your SQL goes here
CREATE UNIQUE INDEX relay_profile_id_connector_reference_id_index ON relay (profile_id, connector_reference_id); | 26 | 70 |
hyperswitch | migrations/2025-01-07-105739_create_index_for_relay/down.sql | .sql | -- This file should undo anything in `up.sql`
DROP INDEX relay_profile_id_connector_reference_id_index; | 21 | 71 |
hyperswitch | migrations/2022-12-14-074547_error-code-in-payment_attempt/up.sql | .sql | -- Your SQL goes here
ALTER TABLE payment_attempt
ADD IF NOT EXISTS error_code VARCHAR(255) DEFAULT NULL; | 26 | 72 |
hyperswitch | migrations/2022-12-14-074547_error-code-in-payment_attempt/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE payment_attempt
DROP COLUMN IF EXISTS error_code; | 23 | 73 |
hyperswitch | migrations/2023-11-30-170902_add-authorizations-table/up.sql | .sql | -- Your SQL goes here
CREATE TABLE IF NOT EXISTS incremental_authorization (
authorization_id VARCHAR(64) NOT NULL,
merchant_id VARCHAR(64) NOT NULL,
payment_id VARCHAR(64) NOT NULL,
amount BIGINT NOT NULL,
created_at TIMESTAMP NOT NULL DEFAULT now()::TIMESTAMP,
modified_at TIMESTAMP NOT NULL D... | 136 | 74 |
hyperswitch | migrations/2023-11-30-170902_add-authorizations-table/down.sql | .sql | -- This file should undo anything in `up.sql`
DROP TABLE IF EXISTS incremental_authorization; | 19 | 75 |
hyperswitch | migrations/2023-07-04-131721_add_org_id_and_org_name/up.sql | .sql | -- Your SQL goes here
ALTER TABLE merchant_account
ADD COLUMN IF NOT EXISTS organization_id VARCHAR(32);
| 23 | 76 |
hyperswitch | migrations/2023-07-04-131721_add_org_id_and_org_name/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE merchant_account DROP COLUMN IF EXISTS organization_id;
| 22 | 77 |
hyperswitch | migrations/2023-12-14-101348_alter_dashboard_metadata_key_type/up.sql | .sql | -- Your SQL goes here
CREATE TYPE "DashboardMetadata" AS ENUM (
'production_agreement',
'setup_processor',
'configure_endpoint',
'setup_complete',
'first_processor_connected',
'second_processor_connected',
'configured_routing',
'test_payment',
'integration_method',
'stripe_connec... | 149 | 78 |
hyperswitch | migrations/2023-12-14-101348_alter_dashboard_metadata_key_type/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE dashboard_metadata ALTER COLUMN data_key TYPE VARCHAR(64);
DROP TYPE IF EXISTS "DashboardMetadata";
| 33 | 79 |
hyperswitch | migrations/2023-06-18-042123_add_udf_column_in_payments/up.sql | .sql | -- Your SQL goes here
ALTER TABLE payment_intent ADD COLUMN udf JSONB;
| 17 | 80 |
hyperswitch | migrations/2023-06-18-042123_add_udf_column_in_payments/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE payment_intent DROP COLUMN udf;
| 20 | 81 |
hyperswitch | migrations/2023-09-13-075226_applepay_verified_domains_in_mca/up.sql | .sql | ALTER TABLE merchant_connector_account
ADD COLUMN IF NOT EXISTS applepay_verified_domains text[];
| 17 | 82 |
hyperswitch | migrations/2023-09-13-075226_applepay_verified_domains_in_mca/down.sql | .sql | ALTER TABLE merchant_connector_account DROP COLUMN IF EXISTS applepay_verified_domains;
| 14 | 83 |
hyperswitch | migrations/2024-11-24-104438_add_error_category_col_to_gsm/up.sql | .sql | -- Your SQL goes here
ALTER TABLE gateway_status_map ADD COLUMN error_category VARCHAR(64);
| 20 | 84 |
hyperswitch | migrations/2024-11-24-104438_add_error_category_col_to_gsm/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE gateway_status_map DROP COLUMN error_category;
| 21 | 85 |
hyperswitch | migrations/2023-01-03-122401_update_merchant_account/up.sql | .sql | -- Your SQL goes here
ALTER TABLE merchant_account
ADD COLUMN locker_id VARCHAR(64); | 20 | 86 |
hyperswitch | migrations/2023-01-03-122401_update_merchant_account/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE merchant_account
DROP COLUMN locker_id; | 21 | 87 |
hyperswitch | migrations/2024-04-12-100908_add_dashboard_metadata_key_onboarding_survey/up.sql | .sql | -- Your SQL goes here
ALTER TYPE "DashboardMetadata"
ADD VALUE IF NOT EXISTS 'onboarding_survey'; | 22 | 88 |
hyperswitch | migrations/2024-04-12-100908_add_dashboard_metadata_key_onboarding_survey/down.sql | .sql | -- This file should undo anything in `up.sql`
SELECT 1; | 15 | 89 |
hyperswitch | migrations/2022-12-19-085322_rename_txn_id_to_attempt_id/up.sql | .sql | ALTER TABLE payment_attempt
RENAME COLUMN txn_id to attempt_id;
| 14 | 90 |
hyperswitch | migrations/2022-12-19-085322_rename_txn_id_to_attempt_id/down.sql | .sql | ALTER TABLE payment_attempt
RENAME COLUMN attempt_id to txn_id;
| 14 | 91 |
hyperswitch | migrations/2024-11-13-090548_add-extended-authorization-related-fields/up.sql | .sql | -- stores the flag send by the merchant during payments-create call
ALTER TABLE payment_intent
ADD COLUMN request_extended_authorization boolean;
ALTER TABLE payment_attempt
-- stores the flag sent to the connector
ADD COLUMN request_extended_authorization boolean;
ALTER TABLE payment_attempt
-- Set to true if exten... | 125 | 92 |
hyperswitch | migrations/2024-11-13-090548_add-extended-authorization-related-fields/down.sql | .sql | -- Remove the 'request_extended_authorization' column from the 'payment_intent' table
ALTER TABLE payment_intent
DROP COLUMN request_extended_authorization;
-- Remove the 'request_extended_authorization' and 'extended_authorization_applied' columns from the 'payment_attempt' table
ALTER TABLE payment_attempt
DROP COLU... | 134 | 93 |
hyperswitch | migrations/2024-01-04-121733_add_dashboard_metadata_key_integration_completed/up.sql | .sql | -- Your SQL goes here
ALTER TYPE "DashboardMetadata" ADD VALUE IF NOT EXISTS 'integration_completed'; | 21 | 94 |
hyperswitch | migrations/2024-01-04-121733_add_dashboard_metadata_key_integration_completed/down.sql | .sql | -- This file should undo anything in `up.sql`
SELECT 1; | 15 | 95 |
hyperswitch | migrations/2024-08-05-171030_add_shipping_cost_in_payment_intent/up.sql | .sql | -- Your SQL goes here
ALTER TABLE payment_intent ADD COLUMN IF NOT EXISTS shipping_cost BIGINT; | 20 | 96 |
hyperswitch | migrations/2024-08-05-171030_add_shipping_cost_in_payment_intent/down.sql | .sql | -- This file should undo anything in `up.sql`
ALTER TABLE payment_intent
DROP COLUMN IF EXISTS shipping_cost; | 23 | 97 |
hyperswitch | migrations/2023-03-15-082312_add_connector_txn_id_merchant_id_index_in_payment_attempt/up.sql | .sql | -- Your SQL goes here
CREATE INDEX payment_attempt_connector_transaction_id_merchant_id_index ON payment_attempt (connector_transaction_id, merchant_id);
| 28 | 98 |
hyperswitch | migrations/2023-03-15-082312_add_connector_txn_id_merchant_id_index_in_payment_attempt/down.sql | .sql | -- This file should undo anything in `up.sql`
DROP INDEX payment_attempt_connector_transaction_id_merchant_id_index;
| 23 | 99 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.