From fbcd21e31e96b3236e0af745c6ccecfc97c83a63 Mon Sep 17 00:00:00 2001 From: Jasder <2053003901@@qq.com> Date: Mon, 18 May 2020 18:03:36 +0800 Subject: [PATCH] ADD model mirror --- db/migrate/20200518081445_create_mirrors.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 db/migrate/20200518081445_create_mirrors.rb diff --git a/db/migrate/20200518081445_create_mirrors.rb b/db/migrate/20200518081445_create_mirrors.rb new file mode 100644 index 000000000..f1691348e --- /dev/null +++ b/db/migrate/20200518081445_create_mirrors.rb @@ -0,0 +1,12 @@ +class CreateMirrors < ActiveRecord::Migration[5.2] + def change + create_table :mirrors do |t| + t.integer :repo_id, foreign_key: true + t.integer :status, default: 0, null: false, comment: "0 - succeeded, 1 - waiting, 2 - failed" + t.integer :interval, comment: "mirror interval with unix time" + t.datetime :next_update_time, comment: "next update mirror time, for datetime" + + t.timestamps + end + end +end