feat: implement market page with QueryProvider and dynamic listings
- wrap root layout with QueryProvider for React Query - replace market UnderConstruction placeholder with MarketClient and real data fetching - implement search, pagination, and sort via search params using getActiveListings - add necessary client components and queries - update dependencies (e.g., prisma, pkg-types)
This commit is contained in:
1 parent
55eebde0ba
commit
ab37b477df
106 files changed
+15261
-301
No files matched your search
@@ -0,0 +1,20 @@
|
||||
-- Migration 017: Adicionar Foreign Key e Atualizar Listings
|
||||
-- Criado em: 2025-01-29
|
||||
-- Objetivo: Adicionar foreign key de listings para items e garantir integridade
|
||||
|
||||
-- Primeiro, adicionar coluna item_id_unified se não existir (para migração gradual)
|
||||
-- Depois, podemos fazer migration dos dados existentes
|
||||
|
||||
-- Por enquanto, vamos manter item_id como está e adicionar uma coluna de referência
|
||||
-- que será populada gradualmente
|
||||
|
||||
-- Adicionar foreign key para items (opcional, permite NULL para itens antigos durante migração)
|
||||
ALTER TABLE listings
|
||||
ADD COLUMN IF NOT EXISTS item_id_unified INTEGER REFERENCES items(item_id) ON DELETE SET NULL;
|
||||
|
||||
-- Ãndice para performance
|
||||
CREATE INDEX IF NOT EXISTS idx_listings_item_id_unified ON listings(item_id_unified);
|
||||
|
||||
-- Comentário
|
||||
COMMENT ON COLUMN listings.item_id_unified IS 'Referência ao item na tabela unificada items (substitui item_id no futuro)';
|
||||
|
||||
Reference in new issue
Block a user