From cd64a7087c7c45b1741d649d1a3fe53423760843 Mon Sep 17 00:00:00 2001 From: Gerhard Gonter <ggonter@gmail.com> Date: Thu, 8 Sep 2016 19:41:43 +0200 Subject: [PATCH] datamodel improved --- app/models/ac_number.rb | 3 +++ app/models/eprint.rb | 3 +++ db/migrate/001_create_eprints.rb | 18 ++++++++++++++++++ db/migrate/002_create_ac_numbers.rb | 19 +++++++++++++++++++ test/unit/ac_number_test.rb | 9 +++++++++ test/unit/eprint_test.rb | 9 +++++++++ 6 files changed, 61 insertions(+) create mode 100644 app/models/ac_number.rb create mode 100644 app/models/eprint.rb create mode 100644 db/migrate/001_create_eprints.rb create mode 100644 db/migrate/002_create_ac_numbers.rb create mode 100644 test/unit/ac_number_test.rb create mode 100644 test/unit/eprint_test.rb diff --git a/app/models/ac_number.rb b/app/models/ac_number.rb new file mode 100644 index 0000000..af53f6c --- /dev/null +++ b/app/models/ac_number.rb @@ -0,0 +1,3 @@ +class AcNumber < ActiveRecord::Base + unloadable +end diff --git a/app/models/eprint.rb b/app/models/eprint.rb new file mode 100644 index 0000000..bee904f --- /dev/null +++ b/app/models/eprint.rb @@ -0,0 +1,3 @@ +class Eprint < ActiveRecord::Base + unloadable +end diff --git a/db/migrate/001_create_eprints.rb b/db/migrate/001_create_eprints.rb new file mode 100644 index 0000000..5b114b9 --- /dev/null +++ b/db/migrate/001_create_eprints.rb @@ -0,0 +1,18 @@ +class CreateEprints < ActiveRecord::Migration + def change + create_table :eprints do |t| + t.integer :eprint_id + t.string :eprint_status + t.string :eprint_type + t.string :eprint_sperre + t.string :eprint_einverstaendnis + t.string :ac_number + t.string :ac_number_status + t.string :matr + t.string :matr_status + t.string :urn + t.string :urn_status + t.string :item_status + end + end +end diff --git a/db/migrate/002_create_ac_numbers.rb b/db/migrate/002_create_ac_numbers.rb new file mode 100644 index 0000000..f04a32b --- /dev/null +++ b/db/migrate/002_create_ac_numbers.rb @@ -0,0 +1,19 @@ +class CreateAcNumbers < ActiveRecord::Migration + def change + create_table :ac_numbers do |t| + t.string :ac_number + t.string :context + t.string :context_id + t.string :context_url + t.integer :xml_ts + t.string :xml_urn + t.string :xml_url + t.string :item_status + t.string :error_source + t.string :error_text + t.string :urn_status + t.string :urn_req_id + t.string :urn_value + end + end +end diff --git a/test/unit/ac_number_test.rb b/test/unit/ac_number_test.rb new file mode 100644 index 0000000..56fcfb4 --- /dev/null +++ b/test/unit/ac_number_test.rb @@ -0,0 +1,9 @@ +require File.expand_path('../../test_helper', __FILE__) + +class AcNumberTest < ActiveSupport::TestCase + + # Replace this with your real tests. + def test_truth + assert true + end +end diff --git a/test/unit/eprint_test.rb b/test/unit/eprint_test.rb new file mode 100644 index 0000000..0456f09 --- /dev/null +++ b/test/unit/eprint_test.rb @@ -0,0 +1,9 @@ +require File.expand_path('../../test_helper', __FILE__) + +class EprintTest < ActiveSupport::TestCase + + # Replace this with your real tests. + def test_truth + assert true + end +end -- GitLab