about summary refs log tree commit diff
path: root/sql/_source/deploy/2
diff options
context:
space:
mode:
authorfranck cuny <franck@lumberjaph.net>2011-02-13 16:20:59 +0100
committerfranck cuny <franck@lumberjaph.net>2011-02-13 16:20:59 +0100
commite81938b20ae19d472a6f835f8af01a428b8724de (patch)
treed6cea5e811f60fcd8f3c94ee1d9b4cf247404531 /sql/_source/deploy/2
parentMake jitterbug::Test use the current perl interp (diff)
parentMerge branch 'feature/stack_builds' into devel (diff)
downloadjitterbug-e81938b20ae19d472a6f835f8af01a428b8724de.tar.gz
Merge branch 'devel'
* devel:
  add more tests
  inside the hook, we check if we can add more than one task for this project
  add configuration option to skip some branches; add tests for the Hook
  that's why we want datetime
  use DateTime
  update templates to show informations about running tasks
  column started_when: datetime when the build started
  prepare to update schema again
  display current build if any
  add sql schema for various version
  don't ignore .sql files
  script to migrate/upgrade dbix schema
  add version to our schema
  update templates and css
  we want a find, not a search here
  add pending status to the schema (TODO: need a script to migrate the schema)
  load tasks and display them on the dashboard
Diffstat (limited to 'sql/_source/deploy/2')
-rw-r--r--sql/_source/deploy/2/001-auto-__VERSION.yml316
-rw-r--r--sql/_source/deploy/2/001-auto.yml525
2 files changed, 841 insertions, 0 deletions
diff --git a/sql/_source/deploy/2/001-auto-__VERSION.yml b/sql/_source/deploy/2/001-auto-__VERSION.yml
new file mode 100644
index 0000000..7179e7f
--- /dev/null
+++ b/sql/_source/deploy/2/001-auto-__VERSION.yml
@@ -0,0 +1,316 @@
+---
+schema:
+  procedures: {}
+  tables:
+    dbix_class_deploymenthandler_versions:
+      constraints:
+        - deferrable: 1
+          expression: ''
+          fields:
+            - id
+          match_type: ''
+          name: ''
+          on_delete: ''
+          on_update: ''
+          options: []
+          reference_fields: []
+          reference_table: ''
+          type: PRIMARY KEY
+        - deferrable: 1
+          expression: ''
+          fields:
+            - version
+          match_type: ''
+          name: dbix_class_deploymenthandler_versions_version
+          on_delete: ''
+          on_update: ''
+          options: []
+          reference_fields: []
+          reference_table: ''
+          type: UNIQUE
+      fields:
+        ddl:
+          data_type: text
+          default_value: ~
+          is_nullable: 1
+          is_primary_key: 0
+          is_unique: 0
+          name: ddl
+          order: 3
+          size:
+            - 0
+        id:
+          data_type: int
+          default_value: ~
+          is_auto_increment: 1
+          is_nullable: 0
+          is_primary_key: 1
+          is_unique: 0
+          name: id
+          order: 1
+          size:
+            - 0
+        upgrade_sql:
+          data_type: text
+          default_value: ~
+          is_nullable: 1
+          is_primary_key: 0
+          is_unique: 0
+          name: upgrade_sql
+          order: 4
+          size:
+            - 0
+        version:
+          data_type: varchar
+          default_value: ~
+          is_nullable: 0
+          is_primary_key: 0
+          is_unique: 1
+          name: version
+          order: 2
+          size:
+            - 50
+      indices: []
+      name: dbix_class_deploymenthandler_versions
+      options: []
+      order: 1
+  triggers: {}
+  views: {}
+translator:
+  add_drop_table: 0
+  filename: ~
+  no_comments: 0
+  parser_args:
+    package: &1 !!perl/hash:jitterbug::Schema
+      class_mappings:
+        DBIx::Class::DeploymentHandler::VersionStorage::Standard::VersionResult: __VERSION
+        jitterbug::Schema::Result::Commit: Commit
+        jitterbug::Schema::Result::Project: Project
+        jitterbug::Schema::Result::Task: Task
+      source_registrations:
+        Commit: !!perl/hash:DBIx::Class::ResultSource::Table
+          _columns:
+            content:
+              data_type: text
+              extra: {}
+            projectid:
+              data_type: int
+              extra: {}
+              is_foreign_key: 1
+            sha256:
+              data_type: text
+              extra: {}
+              is_auto_increment: 0
+            timestamp:
+              _inflate_info:
+                deflate: !!perl/code '{ "DUMMY" }'
+                inflate: !!perl/code '{ "DUMMY" }'
+              data_type: datetime
+              extra: {}
+          _columns_info_loaded: 0
+          _ordered_columns:
+            - sha256
+            - content
+            - projectid
+            - timestamp
+          _primaries: &2
+            - sha256
+          _relationships:
+            project:
+              attrs:
+                accessor: single
+                is_foreign_key_constraint: 1
+                undef_on_null_fk: 1
+              class: jitterbug::Schema::Result::Project
+              cond:
+                foreign.projectid: self.projectid
+              source: jitterbug::Schema::Result::Project
+            tasks:
+              attrs:
+                accessor: multi
+                cascade_copy: 1
+                cascade_delete: 1
+                join_type: LEFT
+              class: jitterbug::Schema::Result::Task
+              cond:
+                foreign.taskid: self.sha256
+              source: jitterbug::Schema::Result::Task
+          _unique_constraints:
+            primary: *2
+          name: commit_push
+          result_class: jitterbug::Schema::Result::Commit
+          resultset_attributes: {}
+          resultset_class: DBIx::Class::ResultSet
+          schema: *1
+          source_name: Commit
+          sqlt_deploy_callback: default_sqlt_deploy_hook
+        Project: !!perl/hash:DBIx::Class::ResultSource::Table
+          _columns:
+            description:
+              data_type: text
+            name:
+              data_type: text
+            owner:
+              data_type: text
+            projectid:
+              data_type: int
+              is_auto_increment: 1
+            url:
+              data_type: text
+          _columns_info_loaded: 0
+          _ordered_columns:
+            - projectid
+            - name
+            - url
+            - description
+            - owner
+          _primaries: &3
+            - projectid
+          _relationships:
+            commits:
+              attrs:
+                accessor: multi
+                cascade_copy: 1
+                cascade_delete: 1
+                join_type: LEFT
+              class: jitterbug::Schema::Result::Commit
+              cond:
+                foreign.sha256: self.projectid
+              source: jitterbug::Schema::Result::Commit
+            tasks:
+              attrs:
+                accessor: multi
+                cascade_copy: 1
+                cascade_delete: 1
+                join_type: LEFT
+              class: jitterbug::Schema::Result::Task
+              cond:
+                foreign.taskid: self.projectid
+              source: jitterbug::Schema::Result::Task
+          _unique_constraints:
+            primary: *3
+            project_name:
+              - name
+          name: project
+          result_class: jitterbug::Schema::Result::Project
+          resultset_attributes: {}
+          resultset_class: DBIx::Class::ResultSet
+          schema: *1
+          source_name: Project
+          sqlt_deploy_callback: default_sqlt_deploy_hook
+        Task: !!perl/hash:DBIx::Class::ResultSource::Table
+          _columns:
+            projectid:
+              data_type: int
+              is_foreign_key: 1
+            running:
+              data_type: bool
+              default_value: 0
+            sha256:
+              data_type: text
+              is_foreign_key: 1
+            taskid:
+              data_type: int
+              is_auto_increment: 1
+          _columns_info_loaded: 0
+          _ordered_columns:
+            - taskid
+            - sha256
+            - projectid
+            - running
+          _primaries: &4
+            - taskid
+          _relationships:
+            commit:
+              attrs:
+                accessor: single
+                is_foreign_key_constraint: 1
+                undef_on_null_fk: 1
+              class: jitterbug::Schema::Result::Commit
+              cond:
+                foreign.sha256: self.sha256
+              source: jitterbug::Schema::Result::Commit
+            project:
+              attrs:
+                accessor: single
+                is_foreign_key_constraint: 1
+                undef_on_null_fk: 1
+              class: jitterbug::Schema::Result::Project
+              cond:
+                foreign.projectid: self.projectid
+              source: jitterbug::Schema::Result::Project
+          _unique_constraints:
+            primary: *4
+            task_projectid:
+              - projectid
+            task_sha256:
+              - sha256
+          name: task
+          result_class: jitterbug::Schema::Result::Task
+          resultset_attributes: {}
+          resultset_class: DBIx::Class::ResultSet
+          schema: *1
+          source_name: Task
+          sqlt_deploy_callback: default_sqlt_deploy_hook
+        __VERSION: !!perl/hash:DBIx::Class::ResultSource::Table
+          _columns:
+            ddl:
+              data_type: text
+              is_nullable: 1
+            id:
+              data_type: int
+              is_auto_increment: 1
+            upgrade_sql:
+              data_type: text
+              is_nullable: 1
+            version:
+              data_type: varchar
+              size: 50
+          _columns_info_loaded: 0
+          _ordered_columns:
+            - id
+            - version
+            - ddl
+            - upgrade_sql
+          _primaries: &5
+            - id
+          _relationships: {}
+          _unique_constraints:
+            dbix_class_deploymenthandler_versions_version:
+              - version
+            primary: *5
+          name: dbix_class_deploymenthandler_versions
+          result_class: DBIx::Class::DeploymentHandler::VersionStorage::Standard::VersionResult
+          resultset_attributes: {}
+          resultset_class: DBIx::Class::DeploymentHandler::VersionStorage::Standard::VersionResultSet
+          schema: *1
+          source_name: __VERSION
+          sqlt_deploy_callback: default_sqlt_deploy_hook
+      storage: !!perl/hash:DBIx::Class::Storage::DBI
+        _connect_info:
+          - dbi:SQLite:dbname=jitterbug.db
+        _dbh_gen: 0
+        _dbi_connect_info:
+          - dbi:SQLite:dbname=jitterbug.db
+          - ~
+          - ~
+          - &6
+            AutoCommit: 1
+            PrintError: 0
+            RaiseError: 1
+        _dbic_connect_attributes: *6
+        _in_dbh_do: 0
+        _sql_maker: ~
+        _sql_maker_opts: {}
+        debugobj: !!perl/hash:DBIx::Class::Storage::Statistics {}
+        savepoints: []
+        schema: *1
+        transaction_depth: 0
+    sources:
+      - __VERSION
+  parser_type: SQL::Translator::Parser::DBIx::Class
+  producer_args: {}
+  producer_type: SQL::Translator::Producer::YAML
+  show_warnings: 0
+  trace: 0
+  version: 0.11007
diff --git a/sql/_source/deploy/2/001-auto.yml b/sql/_source/deploy/2/001-auto.yml
new file mode 100644
index 0000000..f13eec2
--- /dev/null
+++ b/sql/_source/deploy/2/001-auto.yml
@@ -0,0 +1,525 @@
+---
+schema:
+  procedures: {}
+  tables:
+    commit_push:
+      constraints:
+        - deferrable: 1
+          expression: ''
+          fields:
+            - sha256
+          match_type: ''
+          name: ''
+          on_delete: ''
+          on_update: ''
+          options: []
+          reference_fields: []
+          reference_table: ''
+          type: PRIMARY KEY
+        - deferrable: 1
+          expression: ''
+          fields:
+            - projectid
+          match_type: ''
+          name: commit_push_fk_projectid
+          on_delete: ''
+          on_update: ''
+          options: []
+          reference_fields:
+            - projectid
+          reference_table: project
+          type: FOREIGN KEY
+      fields:
+        content:
+          data_type: text
+          default_value: ~
+          is_nullable: 0
+          is_primary_key: 0
+          is_unique: 0
+          name: content
+          order: 2
+          size:
+            - 0
+        projectid:
+          data_type: int
+          default_value: ~
+          is_nullable: 0
+          is_primary_key: 0
+          is_unique: 0
+          name: projectid
+          order: 3
+          size:
+            - 0
+        sha256:
+          data_type: text
+          default_value: ~
+          is_nullable: 0
+          is_primary_key: 1
+          is_unique: 0
+          name: sha256
+          order: 1
+          size:
+            - 0
+        timestamp:
+          data_type: datetime
+          default_value: ~
+          is_nullable: 0
+          is_primary_key: 0
+          is_unique: 0
+          name: timestamp
+          order: 4
+          size:
+            - 0
+      indices:
+        - fields:
+            - projectid
+          name: commit_push_idx_projectid
+          options: []
+          type: NORMAL
+      name: commit_push
+      options: []
+      order: 2
+    project:
+      constraints:
+        - deferrable: 1
+          expression: ''
+          fields:
+            - projectid
+          match_type: ''
+          name: ''
+          on_delete: ''
+          on_update: ''
+          options: []
+          reference_fields: []
+          reference_table: ''
+          type: PRIMARY KEY
+        - deferrable: 1
+          expression: ''
+          fields:
+            - name
+          match_type: ''
+          name: project_name
+          on_delete: ''
+          on_update: ''
+          options: []
+          reference_fields: []
+          reference_table: ''
+          type: UNIQUE
+      fields:
+        description:
+          data_type: text
+          default_value: ~
+          is_nullable: 0
+          is_primary_key: 0
+          is_unique: 0
+          name: description
+          order: 4
+          size:
+            - 0
+        name:
+          data_type: text
+          default_value: ~
+          is_nullable: 0
+          is_primary_key: 0
+          is_unique: 1
+          name: name
+          order: 2
+          size:
+            - 0
+        owner:
+          data_type: text
+          default_value: ~
+          is_nullable: 0
+          is_primary_key: 0
+          is_unique: 0
+          name: owner
+          order: 5
+          size:
+            - 0
+        projectid:
+          data_type: int
+          default_value: ~
+          is_auto_increment: 1
+          is_nullable: 0
+          is_primary_key: 1
+          is_unique: 0
+          name: projectid
+          order: 1
+          size:
+            - 0
+        url:
+          data_type: text
+          default_value: ~
+          is_nullable: 0
+          is_primary_key: 0
+          is_unique: 0
+          name: url
+          order: 3
+          size:
+            - 0
+      indices: []
+      name: project
+      options: []
+      order: 1
+    task:
+      constraints:
+        - deferrable: 1
+          expression: ''
+          fields:
+            - taskid
+          match_type: ''
+          name: ''
+          on_delete: ''
+          on_update: ''
+          options: []
+          reference_fields: []
+          reference_table: ''
+          type: PRIMARY KEY
+        - deferrable: 1
+          expression: ''
+          fields:
+            - projectid
+          match_type: ''
+          name: task_projectid
+          on_delete: ''
+          on_update: ''
+          options: []
+          reference_fields: []
+          reference_table: ''
+          type: UNIQUE
+        - deferrable: 1
+          expression: ''
+          fields:
+            - sha256
+          match_type: ''
+          name: task_sha256
+          on_delete: ''
+          on_update: ''
+          options: []
+          reference_fields: []
+          reference_table: ''
+          type: UNIQUE
+        - deferrable: 1
+          expression: ''
+          fields:
+            - sha256
+          match_type: ''
+          name: task_fk_sha256
+          on_delete: ''
+          on_update: ''
+          options: []
+          reference_fields:
+            - sha256
+          reference_table: commit_push
+          type: FOREIGN KEY
+        - deferrable: 1
+          expression: ''
+          fields:
+            - projectid
+          match_type: ''
+          name: task_fk_projectid
+          on_delete: ''
+          on_update: ''
+          options: []
+          reference_fields:
+            - projectid
+          reference_table: project
+          type: FOREIGN KEY
+      fields:
+        projectid:
+          data_type: int
+          default_value: ~
+          is_nullable: 0
+          is_primary_key: 0
+          is_unique: 1
+          name: projectid
+          order: 3
+          size:
+            - 0
+        running:
+          data_type: bool
+          default_value: 0
+          is_nullable: 0
+          is_primary_key: 0
+          is_unique: 0
+          name: running
+          order: 4
+          size:
+            - 0
+        sha256:
+          data_type: text
+          default_value: ~
+          is_nullable: 0
+          is_primary_key: 0
+          is_unique: 1
+          name: sha256
+          order: 2
+          size:
+            - 0
+        taskid:
+          data_type: int
+          default_value: ~
+          is_auto_increment: 1
+          is_nullable: 0
+          is_primary_key: 1
+          is_unique: 0
+          name: taskid
+          order: 1
+          size:
+            - 0
+      indices:
+        - fields:
+            - sha256
+          name: task_idx_sha256
+          options: []
+          type: NORMAL
+        - fields:
+            - projectid
+          name: task_idx_projectid
+          options: []
+          type: NORMAL
+      name: task
+      options: []
+      order: 3
+  triggers: {}
+  views: {}
+translator:
+  add_drop_table: 0
+  filename: ~
+  no_comments: 0
+  parser_args:
+    package: &1 !!perl/hash:jitterbug::Schema
+      class_mappings:
+        DBIx::Class::DeploymentHandler::VersionStorage::Standard::VersionResult: __VERSION
+        jitterbug::Schema::Result::Commit: Commit
+        jitterbug::Schema::Result::Project: Project
+        jitterbug::Schema::Result::Task: Task
+      source_registrations:
+        Commit: !!perl/hash:DBIx::Class::ResultSource::Table
+          _columns:
+            content:
+              data_type: text
+              extra: {}
+            projectid:
+              data_type: int
+              extra: {}
+              is_foreign_key: 1
+            sha256:
+              data_type: text
+              extra: {}
+              is_auto_increment: 0
+            timestamp:
+              _inflate_info:
+                deflate: !!perl/code '{ "DUMMY" }'
+                inflate: !!perl/code '{ "DUMMY" }'
+              data_type: datetime
+              extra: {}
+          _columns_info_loaded: 0
+          _ordered_columns:
+            - sha256
+            - content
+            - projectid
+            - timestamp
+          _primaries: &2
+            - sha256
+          _relationships:
+            project:
+              attrs:
+                accessor: single
+                is_foreign_key_constraint: 1
+                undef_on_null_fk: 1
+              class: jitterbug::Schema::Result::Project
+              cond:
+                foreign.projectid: self.projectid
+              source: jitterbug::Schema::Result::Project
+            tasks:
+              attrs:
+                accessor: multi
+                cascade_copy: 1
+                cascade_delete: 1
+                join_type: LEFT
+              class: jitterbug::Schema::Result::Task
+              cond:
+                foreign.taskid: self.sha256
+              source: jitterbug::Schema::Result::Task
+          _unique_constraints:
+            primary: *2
+          name: commit_push
+          result_class: jitterbug::Schema::Result::Commit
+          resultset_attributes: {}
+          resultset_class: DBIx::Class::ResultSet
+          schema: *1
+          source_name: Commit
+          sqlt_deploy_callback: default_sqlt_deploy_hook
+        Project: !!perl/hash:DBIx::Class::ResultSource::Table
+          _columns:
+            description:
+              data_type: text
+            name:
+              data_type: text
+            owner:
+              data_type: text
+            projectid:
+              data_type: int
+              is_auto_increment: 1
+            url:
+              data_type: text
+          _columns_info_loaded: 0
+          _ordered_columns:
+            - projectid
+            - name
+            - url
+            - description
+            - owner
+          _primaries: &3
+            - projectid
+          _relationships:
+            commits:
+              attrs:
+                accessor: multi
+                cascade_copy: 1
+                cascade_delete: 1
+                join_type: LEFT
+              class: jitterbug::Schema::Result::Commit
+              cond:
+                foreign.sha256: self.projectid
+              source: jitterbug::Schema::Result::Commit
+            tasks:
+              attrs:
+                accessor: multi
+                cascade_copy: 1
+                cascade_delete: 1
+                join_type: LEFT
+              class: jitterbug::Schema::Result::Task
+              cond:
+                foreign.taskid: self.projectid
+              source: jitterbug::Schema::Result::Task
+          _unique_constraints:
+            primary: *3
+            project_name:
+              - name
+          name: project
+          result_class: jitterbug::Schema::Result::Project
+          resultset_attributes: {}
+          resultset_class: DBIx::Class::ResultSet
+          schema: *1
+          source_name: Project
+          sqlt_deploy_callback: default_sqlt_deploy_hook
+        Task: !!perl/hash:DBIx::Class::ResultSource::Table
+          _columns:
+            projectid:
+              data_type: int
+              is_foreign_key: 1
+            running:
+              data_type: bool
+              default_value: 0
+            sha256:
+              data_type: text
+              is_foreign_key: 1
+            taskid:
+              data_type: int
+              is_auto_increment: 1
+          _columns_info_loaded: 0
+          _ordered_columns:
+            - taskid
+            - sha256
+            - projectid
+            - running
+          _primaries: &4
+            - taskid
+          _relationships:
+            commit:
+              attrs:
+                accessor: single
+                is_foreign_key_constraint: 1
+                undef_on_null_fk: 1
+              class: jitterbug::Schema::Result::Commit
+              cond:
+                foreign.sha256: self.sha256
+              source: jitterbug::Schema::Result::Commit
+            project:
+              attrs:
+                accessor: single
+                is_foreign_key_constraint: 1
+                undef_on_null_fk: 1
+              class: jitterbug::Schema::Result::Project
+              cond:
+                foreign.projectid: self.projectid
+              source: jitterbug::Schema::Result::Project
+          _unique_constraints:
+            primary: *4
+            task_projectid:
+              - projectid
+            task_sha256:
+              - sha256
+          name: task
+          result_class: jitterbug::Schema::Result::Task
+          resultset_attributes: {}
+          resultset_class: DBIx::Class::ResultSet
+          schema: *1
+          source_name: Task
+          sqlt_deploy_callback: default_sqlt_deploy_hook
+        __VERSION: !!perl/hash:DBIx::Class::ResultSource::Table
+          _columns:
+            ddl:
+              data_type: text
+              is_nullable: 1
+            id:
+              data_type: int
+              is_auto_increment: 1
+            upgrade_sql:
+              data_type: text
+              is_nullable: 1
+            version:
+              data_type: varchar
+              size: 50
+          _columns_info_loaded: 0
+          _ordered_columns:
+            - id
+            - version
+            - ddl
+            - upgrade_sql
+          _primaries: &5
+            - id
+          _relationships: {}
+          _unique_constraints:
+            dbix_class_deploymenthandler_versions_version:
+              - version
+            primary: *5
+          name: dbix_class_deploymenthandler_versions
+          result_class: DBIx::Class::DeploymentHandler::VersionStorage::Standard::VersionResult
+          resultset_attributes: {}
+          resultset_class: DBIx::Class::DeploymentHandler::VersionStorage::Standard::VersionResultSet
+          schema: *1
+          source_name: __VERSION
+          sqlt_deploy_callback: default_sqlt_deploy_hook
+      storage: !!perl/hash:DBIx::Class::Storage::DBI
+        _connect_info:
+          - dbi:SQLite:dbname=jitterbug.db
+        _dbh_gen: 0
+        _dbi_connect_info:
+          - dbi:SQLite:dbname=jitterbug.db
+          - ~
+          - ~
+          - &6
+            AutoCommit: 1
+            PrintError: 0
+            RaiseError: 1
+        _dbic_connect_attributes: *6
+        _in_dbh_do: 0
+        _sql_maker: ~
+        _sql_maker_opts: {}
+        debugobj: !!perl/hash:DBIx::Class::Storage::Statistics {}
+        savepoints: []
+        schema: *1
+        transaction_depth: 0
+    sources:
+      - Commit
+      - Project
+      - Task
+  parser_type: SQL::Translator::Parser::DBIx::Class
+  producer_args: {}
+  producer_type: SQL::Translator::Producer::YAML
+  show_warnings: 0
+  trace: 0
+  version: 0.11007