Refactored post.py and create_table.sql