Advertisement
bakhridinova

Untitled

Jun 5th, 2023 (edited)
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 2.83 KB | None | 0 0
  1. databaseChangeLog:
  2.   - changeSet:
  3.       id: create-task-dependencies-table
  4.       author: Leyla
  5.       changes:
  6.         - createTable:
  7.             tableName: task_dependencies
  8.             columns:
  9.               - column:
  10.                   name: task_id
  11.                   type: bigint
  12.                   constraints:
  13.                     nullable: false
  14.               - column:
  15.                   name: dependency_id
  16.                   type: bigint
  17.                   constraints:
  18.                     nullable: false
  19.  
  20.         - addForeignKeyConstraint:
  21.             baseColumnNames: task_id
  22.             baseTableName: task_dependencies
  23.             constraintName: fk_task_dependencies_task_id
  24.             deferrable: true
  25.             initiallyDeferred: true
  26.             onDelete: RESTRICT
  27.             onUpdate: RESTRICT
  28.             referencedColumnNames: id
  29.             referencedTableName: tasks
  30.             referencedTableSchemaName: public
  31.             validate: true
  32.  
  33.         - addForeignKeyConstraint:
  34.             baseColumnNames: dependency_id
  35.             baseTableName: task_dependencies
  36.             constraintName: fk_task_dependencies_dependency_id
  37.             deferrable: true
  38.             initiallyDeferred: true
  39.             onDelete: RESTRICT
  40.             onUpdate: RESTRICT
  41.             referencedColumnNames: id
  42.             referencedTableName: tasks
  43.             referencedTableSchemaName: public
  44.             validate: true
  45.  
  46. databaseChangeLog:
  47.   - changeSet:
  48.       id: create-task-successors-table
  49.       author: Leyla
  50.       changes:
  51.         - createTable:
  52.             tableName: task_successors
  53.             columns:
  54.               - column:
  55.                 name: task_id
  56.                 type: bigint
  57.                 constraints:
  58.                   nullable: false
  59.               - column:
  60.                 name: successor_id
  61.                 type: bigint
  62.                 constraints:
  63.                   nullable: false
  64.  
  65.         - addForeignKeyConstraint:
  66.             baseColumnNames: task_id
  67.             baseTableName: task_successors
  68.             constraintName: fk_task_successors_task_id
  69.             deferrable: true
  70.             initiallyDeferred: true
  71.             onDelete: RESTRICT
  72.             onUpdate: RESTRICT
  73.             referencedColumnNames: id
  74.             referencedTableName: tasks
  75.             referencedTableSchemaName: public
  76.             validate: true
  77.  
  78.         - addForeignKeyConstraint:
  79.             baseColumnNames: successor_id
  80.             baseTableName: task_successors
  81.             constraintName: fk_task_successors_task_id
  82.             deferrable: true
  83.             initiallyDeferred: true
  84.             onDelete: RESTRICT
  85.             onUpdate: RESTRICT
  86.             referencedColumnNames: id
  87.             referencedTableName: tasks
  88.             referencedTableSchemaName: public
  89.             validate: true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement