BEGIN TRY

BEGIN TRAN;

-- AlterTable
ALTER TABLE [dbo].[campus] ADD CONSTRAINT [campus_actif_df] DEFAULT 1 FOR [actif], CONSTRAINT [campus_created_at_df] DEFAULT CURRENT_TIMESTAMP FOR [created_at];

-- AlterTable
ALTER TABLE [dbo].[categorie_materiel] ADD CONSTRAINT [categorie_materiel_actif_df] DEFAULT 1 FOR [actif], CONSTRAINT [categorie_materiel_created_at_df] DEFAULT CURRENT_TIMESTAMP FOR [created_at];

-- AlterTable
ALTER TABLE [dbo].[utilisateur] ADD CONSTRAINT [utilisateur_actif_df] DEFAULT 1 FOR [actif], CONSTRAINT [utilisateur_created_at_df] DEFAULT CURRENT_TIMESTAMP FOR [created_at];

COMMIT TRAN;

END TRY
BEGIN CATCH

IF @@TRANCOUNT > 0
BEGIN
    ROLLBACK TRAN;
END;
THROW

END CATCH
