Sha256: 45f03cd050b3bab21103a62f87a224019f858ef60a971c91e440e5f879616894

Contents?: true

Size: 609 Bytes

Versions: 2

Compression:

Stored size: 609 Bytes

Contents

# frozen_string_literal: true

class CreateHostsResources < ActiveRecord::Migration[6.1]
  def change
    create_table :hosts_resources do |t|
      t.belongs_to :host, index: { unique: true }, foreign_key: true, null: false
      t.integer :cpu_cores, default: nil
      t.integer :memory_mb, default: nil
      t.integer :disk_gb, default: nil

      t.timestamps
    end

    create_table :resource_quotas_hosts do |t|
      t.belongs_to :host, index: { unique: true }, foreign_key: true, null: false
      t.belongs_to :resource_quota, foreign_key: true, null: false

      t.timestamps
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
foreman_resource_quota-0.3.1 db/migrate/20240611142813_create_hosts_resources.rb
foreman_resource_quota-0.3.0 db/migrate/20240611142813_create_hosts_resources.rb