added an index for the tags table and set some NOT NULL constraints.