| | 103 | |
|---|
| | 104 | def migrate_TICKET(self): |
|---|
| | 105 | """ Migrate the ticket table and adjust the sequences properly """ |
|---|
| | 106 | self.default_copy('ticket') |
|---|
| | 107 | select_maxticket = "SELECT max(id) FROM ticket" |
|---|
| | 108 | pgcur = self.pgdb.cursor() |
|---|
| | 109 | pgcur.execute(select_maxticket) |
|---|
| | 110 | r = pgcur.fetchone() |
|---|
| | 111 | if r: |
|---|
| | 112 | pgcur.execute("SELECT setval('ticket_id_seq', %s)", r) |
|---|
| | 113 | self.pgdb.commit() |
|---|
| | 114 | |
|---|
| | 115 | def migrate_REPORT(self): |
|---|
| | 116 | """ Migrate the report table and adjust the sequences properly """ |
|---|
| | 117 | self.default_copy('report') |
|---|
| | 118 | select_maxreport = "SELECT max(id) FROM report" |
|---|
| | 119 | pgcur = self.pgdb.cursor() |
|---|
| | 120 | pgcur.execute(select_maxreport) |
|---|
| | 121 | r = pgcur.fetchone() |
|---|
| | 122 | if r: |
|---|
| | 123 | pgcur.execute("SELECT setval('report_id_seq', %s)", r) |
|---|
| | 124 | self.pgdb.commit() |
|---|