Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,10 @@ MONNIFY_CONTRACT_CODE=your-monnify-contract-code
FLUTTERWAVE_SECRET_KEY=your-flutterwave-secret-key
FLUTTERWAVE_BASE_URL=https://api.flutterwave.com

# Bank connection webhooks (Paystack / Stripe)
PAYSTACK_WEBHOOK_SECRET=your-paystack-webhook-secret
PAYSTACK_SECRET_KEY=your-paystack-secret-key
STRIPE_WEBHOOK_SECRET=your-stripe-webhook-signing-secret

# CORS
CORS_ALLOWED_ORIGINS=http://localhost:3000,https://app.vestroll.com
22 changes: 22 additions & 0 deletions drizzle/migrations/0002_add_bank_accounts.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
CREATE TYPE "public"."bank_account_status" AS ENUM('pending', 'verified', 'disconnected');--> statement-breakpoint
CREATE TYPE "public"."bank_connection_provider" AS ENUM('paystack', 'stripe');--> statement-breakpoint
CREATE TABLE "bank_accounts" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"organization_id" uuid NOT NULL,
"provider" "bank_connection_provider" NOT NULL,
"provider_account_id" varchar(255) NOT NULL,
"account_number" varchar(255),
"bank_name" varchar(255),
"account_holder_name" varchar(255),
"status" "bank_account_status" DEFAULT 'pending' NOT NULL,
"verified_at" timestamp,
"disconnected_at" timestamp,
"created_at" timestamp DEFAULT now() NOT NULL,
"updated_at" timestamp DEFAULT now() NOT NULL
);
--> statement-breakpoint
ALTER TABLE "bank_accounts" ADD CONSTRAINT "bank_accounts_organization_id_organizations_id_fk" FOREIGN KEY ("organization_id") REFERENCES "public"."organizations"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
CREATE INDEX "bank_accounts_organization_id_idx" ON "bank_accounts" USING btree ("organization_id");--> statement-breakpoint
CREATE INDEX "bank_accounts_provider_account_id_idx" ON "bank_accounts" USING btree ("provider_account_id");--> statement-breakpoint
CREATE INDEX "bank_accounts_status_idx" ON "bank_accounts" USING btree ("status");--> statement-breakpoint
CREATE UNIQUE INDEX "bank_accounts_provider_account_id_unique" ON "bank_accounts" USING btree ("provider_account_id");
Loading
Loading