Fixed table creating order
Merge branch 'postgres-fix'