-- Default values for existing records in adherent
UPDATE adherent SET lieu_naissance_ville = 'Non renseigné' WHERE lieu_naissance_ville IS NULL;
UPDATE adherent SET lieu_naissance_pays = 'France' WHERE lieu_naissance_pays IS NULL;
UPDATE adherent SET nationalite = 'Française' WHERE nationalite IS NULL;

-- Default values for existing records in pre_inscription
UPDATE pre_inscription SET lieu_naissance_ville = 'Non renseigné' WHERE lieu_naissance_ville IS NULL;
UPDATE pre_inscription SET lieu_naissance_pays = 'France' WHERE lieu_naissance_pays IS NULL;
UPDATE pre_inscription SET nationalite = 'Française' WHERE nationalite IS NULL;

-- Now make them NOT NULL
ALTER TABLE adherent ALTER COLUMN lieu_naissance_ville SET NOT NULL;
ALTER TABLE adherent ALTER COLUMN lieu_naissance_pays SET NOT NULL;
ALTER TABLE adherent ALTER COLUMN nationalite SET NOT NULL;

ALTER TABLE pre_inscription ALTER COLUMN lieu_naissance_ville SET NOT NULL;
ALTER TABLE pre_inscription ALTER COLUMN lieu_naissance_pays SET NOT NULL;
ALTER TABLE pre_inscription ALTER COLUMN nationalite SET NOT NULL;
