chore(release): snapshot 1.4.2
This commit is contained in:
16
postgres/migrations/015_create_template_solutions.sql
Normal file
16
postgres/migrations/015_create_template_solutions.sql
Normal file
@@ -0,0 +1,16 @@
|
||||
-- Migration: Vincular Signup Templates com Solutions
|
||||
-- Permite que ao criar um link de cadastro personalizado, o superadmin
|
||||
-- selecione quais soluções estarão disponíveis para as agências que se cadastrarem
|
||||
|
||||
CREATE TABLE IF NOT EXISTS template_solutions (
|
||||
template_id UUID NOT NULL REFERENCES agency_signup_templates(id) ON DELETE CASCADE,
|
||||
solution_id UUID NOT NULL REFERENCES solutions(id) ON DELETE CASCADE,
|
||||
created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (template_id, solution_id)
|
||||
);
|
||||
|
||||
-- Index para queries rápidas
|
||||
CREATE INDEX idx_template_solutions_template ON template_solutions(template_id);
|
||||
CREATE INDEX idx_template_solutions_solution ON template_solutions(solution_id);
|
||||
|
||||
COMMENT ON TABLE template_solutions IS 'Relacionamento N:N entre signup templates e solutions - define quais soluções estarão disponíveis ao cadastrar via template';
|
||||
Reference in New Issue
Block a user