Sha256: 32e865816cf83045b4424103147e848401bb85102291f4f3bdb70313cac2ca0f

Contents?: true

Size: 1.4 KB

Versions: 2

Compression:

Stored size: 1.4 KB

Contents

Sequel.migration do
  change do
    create_table :clients do
      uuid    :uuid, primary_key: true
      boolean :busy, null: false
      inet    :host, null: false
      integer :port, null: false
      string  :prot, null: false
    end

    create_table :projects do
      uuid   :uuid, primary_key: true
      string :name, null: false
    end

    create_table :registrations do
      uuid    :uuid, primary_key: true
      inet    :host, null: false
      integer :port, null: false
      string  :prot, null: false
      foreign_key :client_uuid,  :clients,  index: true, null: false,
                                            type: :uuid
      foreign_key :project_uuid, :projects, index: true, null: false,
                                            type: :uuid
    end

    create_table :results do
      uuid    :uuid, primary_key: true
      bytea   :data, null: false
      inet    :host, null: false
      integer :port, null: false
      string  :prot, null: false
      foreign_key :client_uuid, :clients, index: true, null: false, type: :uuid
      foreign_key :task_uuid,   :tasks,   index: true, null: false, type: :uuid
    end

    create_table :tasks do
      uuid    :uuid, primary_key: true
      boolean :done, null: false
      bytea   :data, null: false
      foreign_key :project_uuid, :projects, index: true, null: false,
                                            type: :uuid
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
kamerling-0.0.3 lib/kamerling/migrations/1_basic_schema.rb
kamerling-0.0.2 lib/kamerling/migrations/1_basic_schema.rb