File: sqlite_specific_schema.rb

package info (click to toggle)
rails 2%3A7.2.2.1%2Bdfsg-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 43,352 kB
  • sloc: ruby: 349,799; javascript: 30,703; yacc: 46; sql: 43; sh: 29; makefile: 27
file content (22 lines) | stat: -rw-r--r-- 1,063 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
22
# frozen_string_literal: true

ActiveRecord::Schema.define do
  create_table :defaults, force: true do |t|
      t.integer :random_number, default: -> { "ABS(RANDOM())" }
      t.string :ruby_on_rails, default: -> { "('Ruby ' || 'on ' || 'Rails')" }
      t.date :modified_date, default: -> { "CURRENT_DATE" }
      t.date :modified_date_function, default: -> { "DATE('now')" }
      t.date :fixed_date, default: "2004-01-01"
      t.datetime :modified_time, default: -> { "CURRENT_TIMESTAMP" }
      t.datetime :modified_time_without_precision, precision: nil, default: -> { "CURRENT_TIMESTAMP" }
      t.datetime :modified_time_with_precision_0, precision: 0, default: -> { "CURRENT_TIMESTAMP" }
      t.datetime :modified_time_function, default: -> { "DATETIME('now')" }
      t.datetime :fixed_time, default: "2004-01-01 00:00:00.000000-00"
      t.column :char1, "char(1)", default: "Y"
      t.string :char2, limit: 50, default: "a varchar field"
      t.text :char3, default: "a text field"
      t.text :multiline_default, default: "--- []

"
    end
end