Sha256: 781b0be280c03795b8c6cde7d47f6e8fdc94ad39f35e14da432987dab432d5bd

Contents?: true

Size: 757 Bytes

Versions: 24

Compression:

Stored size: 757 Bytes

Contents

# frozen_string_literal: true

class CreateKatalystNavigationMenus < ActiveRecord::Migration[7.0]
  def change
    create_table :katalyst_navigation_menus do |t|
      t.string :title
      t.string :slug, index: true

      t.references :published_version
      t.references :draft_version

      t.timestamps
    end

    create_table :katalyst_navigation_menu_versions do |t|
      t.references :parent, foreign_key: { to_table: :katalyst_navigation_menus }, null: false
      t.json :nodes

      t.timestamps
    end

    add_foreign_key :katalyst_navigation_menus, :katalyst_navigation_menu_versions, column: :published_version_id
    add_foreign_key :katalyst_navigation_menus, :katalyst_navigation_menu_versions, column: :draft_version_id
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
katalyst-navigation-1.8.4 db/migrate/20220826034057_create_katalyst_navigation_menus.rb
katalyst-navigation-1.8.3 db/migrate/20220826034057_create_katalyst_navigation_menus.rb
katalyst-navigation-1.8.2 db/migrate/20220826034057_create_katalyst_navigation_menus.rb
katalyst-navigation-1.8.1 db/migrate/20220826034057_create_katalyst_navigation_menus.rb
katalyst-navigation-1.8.0 db/migrate/20220826034057_create_katalyst_navigation_menus.rb
katalyst-navigation-1.6.0 db/migrate/20220826034057_create_katalyst_navigation_menus.rb
katalyst-navigation-1.5.2 db/migrate/20220826034057_create_katalyst_navigation_menus.rb
katalyst-navigation-1.5.1 db/migrate/20220826034057_create_katalyst_navigation_menus.rb
katalyst-navigation-1.5.0 db/migrate/20220826034057_create_katalyst_navigation_menus.rb
katalyst-navigation-1.4.1 db/migrate/20220826034057_create_katalyst_navigation_menus.rb
katalyst-navigation-1.4.0 db/migrate/20220826034057_create_katalyst_navigation_menus.rb
katalyst-navigation-1.3.4 db/migrate/20220826034057_create_katalyst_navigation_menus.rb
katalyst-navigation-1.3.3 db/migrate/20220826034057_create_katalyst_navigation_menus.rb
katalyst-navigation-1.3.2 db/migrate/20220826034057_create_katalyst_navigation_menus.rb
katalyst-navigation-1.3.1 db/migrate/20220826034057_create_katalyst_navigation_menus.rb
katalyst-navigation-1.3.0 db/migrate/20220826034057_create_katalyst_navigation_menus.rb
katalyst-navigation-1.2.0 db/migrate/20220826034057_create_katalyst_navigation_menus.rb
katalyst-navigation-1.1.2 db/migrate/20220826034057_create_katalyst_navigation_menus.rb
katalyst-navigation-1.1.1 db/migrate/20220826034057_create_katalyst_navigation_menus.rb
katalyst-navigation-1.1.0 db/migrate/20220826034057_create_katalyst_navigation_menus.rb