20260204
This commit is contained in:
21
db/migrations/20260203123701_drop_mp_payments.sql
Normal file
21
db/migrations/20260203123701_drop_mp_payments.sql
Normal file
@@ -0,0 +1,21 @@
|
||||
-- migrate:up
|
||||
-- Eliminar la tabla mp_payments (integración de MercadoPago removida)
|
||||
drop table if exists mp_payments;
|
||||
|
||||
-- migrate:down
|
||||
-- Recrear la tabla si se necesita rollback
|
||||
create table if not exists mp_payments (
|
||||
tenant_id uuid not null references tenants(id) on delete cascade,
|
||||
woo_order_id bigint null,
|
||||
preference_id text null,
|
||||
payment_id text null,
|
||||
status text null,
|
||||
paid_at timestamptz null,
|
||||
raw jsonb not null default '{}'::jsonb,
|
||||
created_at timestamptz not null default now(),
|
||||
updated_at timestamptz not null default now(),
|
||||
primary key (tenant_id, payment_id)
|
||||
);
|
||||
|
||||
create index if not exists mp_payments_tenant_order_idx
|
||||
on mp_payments (tenant_id, woo_order_id);
|
||||
7
db/migrations/20260204155247_delivery_zones.sql
Normal file
7
db/migrations/20260204155247_delivery_zones.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
-- migrate:up
|
||||
-- Agregar columna delivery_zones para configurar zonas de entrega por barrio CABA
|
||||
ALTER TABLE tenant_settings
|
||||
ADD COLUMN IF NOT EXISTS delivery_zones JSONB DEFAULT '{}';
|
||||
|
||||
-- migrate:down
|
||||
ALTER TABLE tenant_settings DROP COLUMN IF EXISTS delivery_zones;
|
||||
Reference in New Issue
Block a user