Sha256: 5e586f455434ee95b4f75893a4dcbc13a6c812953baec29b5af170773813a9c6

Contents?: true

Size: 790 Bytes

Versions: 8

Compression:

Stored size: 790 Bytes

Contents

# frozen_string_literal: true

ActiveRecord::Schema.define do
  create_table :product_categories, id: :string, force: true do |t|
    t.string :name, null: false

    t.timestamps null: false
  end

  create_table :products, force: true do |t|
    t.belongs_to :category, type: :string, foreign_key: { to_table: 'product_categories' }

    t.string :title, null: false

    t.text :description

    t.integer :rating, limit: 1

    t.timestamps null: false
  end

  create_table :product_variations, force: true do |t|
    t.belongs_to :product, null: false, foreign_key: true

    t.string :title, null: false

    t.string :currency, null: false, default: 'USD'
    t.integer :amount, null: false, default: 0

    t.integer :stock_status, limit: 1

    t.timestamps null: false
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
pursuit-1.1.0 spec/internal/db/schema.rb
pursuit-1.0.1 spec/internal/db/schema.rb
pursuit-0.4.5 spec/internal/db/schema.rb
pursuit-0.4.3 spec/internal/db/schema.rb
pursuit-0.4.2 spec/internal/db/schema.rb
pursuit-0.4.1 spec/internal/db/schema.rb
pursuit-0.4.0 spec/internal/db/schema.rb
pursuit-0.3.2 spec/internal/db/schema.rb