rename type column because name is reserved for STI
insert mandatory fields into database
add factories for namespace and field
add all_fields method to namespace that includes custom and mandatory fields