change database and add time and place choices

change sqlite3 to postgresql, and add time and place choices, it can run now.