-- Template migration for each organization schema.
-- Replace {schema} with the real schema name, e.g. company_<organization_id>.

update {schema}.number_ranges
set pattern = 'KU{counter}', updated_at = now()
where code = 'customers';

update {schema}.number_ranges
set pattern = 'LI{counter}', updated_at = now()
where code = 'suppliers';

update {schema}.number_ranges
set pattern = 'AR{counter}', updated_at = now()
where code = 'items';

update {schema}.number_ranges
set pattern = 'AK{counter}', updated_at = now()
where code = 'activities';

update {schema}.number_ranges
set pattern = 'AR{counter}', updated_at = now()
where code = 'outgoing_invoices';
