added #1004 Create indexes at the end in SQL export

Signed-off-by: Viduranga Wijesooriya <vpowerrc@gmail.com>