equal
deleted
inserted
replaced
1561 def cmd_add_relation_type_table(self, rtype, commit=True): |
1561 def cmd_add_relation_type_table(self, rtype, commit=True): |
1562 """low level method to create the sql table for an existing relation. |
1562 """low level method to create the sql table for an existing relation. |
1563 This may be useful on accidental desync between the repository schema |
1563 This may be useful on accidental desync between the repository schema |
1564 and a sql database |
1564 and a sql database |
1565 """ |
1565 """ |
1566 dbhelper = self.repo.system_source.dbhelper |
1566 tablesql = rschema2sql(self.repo.schema.rschema(rtype)) |
1567 tablesql = rschema2sql(dbhelper, self.repo.schema.rschema(rtype)) |
|
1568 for sql in tablesql.split(';'): |
1567 for sql in tablesql.split(';'): |
1569 if sql.strip(): |
1568 if sql.strip(): |
1570 self.sqlexec(sql) |
1569 self.sqlexec(sql) |
1571 if commit: |
1570 if commit: |
1572 self.commit() |
1571 self.commit() |