* extracting get_column_def from create_table_from_entity to make it available for database upgrade processes.
* Align code example formatting
* Converting the foreign key related code from create_table_from_entity into From<RelationDef> implementations to make its usage easier in different context, like updating a database.
* Refactor
* Fixup
Co-authored-by: Billy Chan <ccw.billy.123@gmail.com>