File: mysql2_schema.rb

package info (click to toggle)
ruby-activerecord-import 1.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 840 kB
  • sloc: ruby: 4,698; makefile: 7
file content (21 lines) | stat: -rw-r--r-- 647 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# frozen_string_literal: true

ActiveRecord::Schema.define do
  create_table :books, force: :cascade do |t|
    t.string :title, null: false
    t.virtual :upper_title, type: :string, as: "upper(`title`)" if t.respond_to?(:virtual)
    t.string :publisher, null: false, default: 'Default Publisher'
    t.string :author_name, null: false
    t.datetime :created_at
    t.datetime :created_on
    t.datetime :updated_at
    t.datetime :updated_on
    t.date :publish_date
    t.integer :topic_id
    t.integer :tag_id
    t.integer :publisher_id
    t.boolean :for_sale, default: true
    t.integer :status, default: 0
    t.string :type
  end
end