From a7791635aa98f012d35f97c3c5288494bbb28e38 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Wed, 13 Mar 2024 18:03:43 +0100 Subject: Initial commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miquel Sabaté Solà --- db/migrate/20240224162412_create_things.rb | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 db/migrate/20240224162412_create_things.rb (limited to 'db/migrate/20240224162412_create_things.rb') diff --git a/db/migrate/20240224162412_create_things.rb b/db/migrate/20240224162412_create_things.rb new file mode 100644 index 0000000..5fca815 --- /dev/null +++ b/db/migrate/20240224162412_create_things.rb @@ -0,0 +1,23 @@ +class CreateThings < ActiveRecord::Migration[7.1] + def change + create_table :things do |t| + t.string :target + t.string :title, null: false, index: { unique: true } + t.string :publisher + t.string :address + t.integer :year + t.string :url + t.datetime :access + t.string :location + t.string :insideof + t.string :pages + t.references :user, null: false, foreign_key: true + t.integer :rate + t.integer :status + t.integer :kind + t.datetime :bought_at + + t.timestamps + end + end +end -- cgit v1.2.3