Adding a constraint dynamically after the table is initialised