change order of creation and add unique constraint to cell relation