errors.py 970 B

123456789101112131415161718192021222324252627282930
  1. # Use of this source code is governed by a BSD-style
  2. # license that can be found in the LICENSE file.
  3. # Copyright 2019 The OSArchiver Authors. All rights reserved.
  4. """
  5. Destination Db implementation exceptions
  6. """
  7. from osarchiver.errors import OSArchiverException
  8. class OSArchiverNotEqualDbCreateStatements(OSArchiverException):
  9. """
  10. Exception raised when create statement is different between source and
  11. destination database
  12. """
  13. def __init__(self, message=None):
  14. super().__init__(message='The CREATE DATABASE statement is not equal '
  15. 'between src and dst')
  16. class OSArchiverNotEqualTableCreateStatements(OSArchiverException):
  17. """
  18. Exception raised when create statement is different between source and
  19. destination table
  20. """
  21. def __init__(self, message=None):
  22. super().__init__(message='The SHOW CREATE TABLE statement is not equal'
  23. ' between src and dst table')