From ed3904f66a623fed71dc898a85ac04c7d770a745 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Heiko=20Bernl=C3=B6hr?= Date: Sat, 18 Dec 2021 19:32:31 +0100 Subject: WIP: Rails 6 Change ECS user to ECS6 and databases to cc6 Initial Rails 6 update. --- Gemfile | 2 +- Gemfile.lock | 140 +++++++++++--------- app/assets/config/manifest.js | 4 + bin/setup | 12 +- config/cable.yml | 2 +- config/environments/development.rb | 7 +- config/environments/production.rb | 34 +++-- config/environments/test.rb | 16 ++- config/initializers/content_security_policy.rb | 5 + config/initializers/new_framework_defaults_6_0.rb | 45 +++++++ config/locales/en.yml | 2 +- db/schema.rb | 148 +++++++++++----------- 12 files changed, 258 insertions(+), 159 deletions(-) create mode 100644 app/assets/config/manifest.js create mode 100644 config/initializers/new_framework_defaults_6_0.rb diff --git a/Gemfile b/Gemfile index 81cbb3e..d5d3eaa 100644 --- a/Gemfile +++ b/Gemfile @@ -3,7 +3,7 @@ ruby '2.7.5' #gem "minitest", "5.10.1" # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' -gem 'rails', '5.2.6' +gem 'rails', '6.0.0' gem 'rails-controller-testing' # Use sqlite3 as the database for Active Record gem 'sqlite3', '~> 1.3.6' diff --git a/Gemfile.lock b/Gemfile.lock index d3018a8..0807733 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,48 +1,61 @@ GEM remote: https://rubygems.org/ specs: - actioncable (5.2.6) - actionpack (= 5.2.6) + actioncable (6.0.0) + actionpack (= 6.0.0) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailer (5.2.6) - actionpack (= 5.2.6) - actionview (= 5.2.6) - activejob (= 5.2.6) + actionmailbox (6.0.0) + actionpack (= 6.0.0) + activejob (= 6.0.0) + activerecord (= 6.0.0) + activestorage (= 6.0.0) + activesupport (= 6.0.0) + mail (>= 2.7.1) + actionmailer (6.0.0) + actionpack (= 6.0.0) + actionview (= 6.0.0) + activejob (= 6.0.0) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (5.2.6) - actionview (= 5.2.6) - activesupport (= 5.2.6) - rack (~> 2.0, >= 2.0.8) + actionpack (6.0.0) + actionview (= 6.0.0) + activesupport (= 6.0.0) + rack (~> 2.0) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (5.2.6) - activesupport (= 5.2.6) + rails-html-sanitizer (~> 1.0, >= 1.2.0) + actiontext (6.0.0) + actionpack (= 6.0.0) + activerecord (= 6.0.0) + activestorage (= 6.0.0) + activesupport (= 6.0.0) + nokogiri (>= 1.8.5) + actionview (6.0.0) + activesupport (= 6.0.0) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.0.3) - activejob (5.2.6) - activesupport (= 5.2.6) + rails-html-sanitizer (~> 1.1, >= 1.2.0) + activejob (6.0.0) + activesupport (= 6.0.0) globalid (>= 0.3.6) - activemodel (5.2.6) - activesupport (= 5.2.6) - activerecord (5.2.6) - activemodel (= 5.2.6) - activesupport (= 5.2.6) - arel (>= 9.0) - activestorage (5.2.6) - actionpack (= 5.2.6) - activerecord (= 5.2.6) - marcel (~> 1.0.0) - activesupport (5.2.6) + activemodel (6.0.0) + activesupport (= 6.0.0) + activerecord (6.0.0) + activemodel (= 6.0.0) + activesupport (= 6.0.0) + activestorage (6.0.0) + actionpack (= 6.0.0) + activejob (= 6.0.0) + activerecord (= 6.0.0) + marcel (~> 0.3.1) + activesupport (6.0.0) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) tzinfo (~> 1.1) - arel (9.0.0) + zeitwerk (~> 2.1, >= 2.1.8) bindex (0.8.1) builder (3.2.4) byebug (11.1.3) @@ -59,8 +72,8 @@ GEM erubi (1.10.0) execjs (2.8.1) ffi (1.15.4) - globalid (0.4.2) - activesupport (>= 4.2.0) + globalid (1.0.0) + activesupport (>= 5.0) haml (5.2.2) temple (>= 0.8.0) tilt @@ -84,31 +97,39 @@ GEM nokogiri (>= 1.5.9) mail (2.7.1) mini_mime (>= 0.1.1) - marcel (1.0.2) + marcel (0.3.3) + mimemagic (~> 0.3.2) method_source (1.0.0) + mimemagic (0.3.10) + nokogiri (~> 1) + rake mini_mime (1.1.2) - mini_portile2 (2.4.0) + mini_portile2 (2.6.1) minitest (5.15.0) mysql2 (0.5.3) nio4r (2.5.8) - nokogiri (1.10.10) - mini_portile2 (~> 2.4.0) + nokogiri (1.12.5) + mini_portile2 (~> 2.6.1) + racc (~> 1.4) pg (1.2.3) + racc (1.6.0) rack (2.2.3) rack-test (1.1.0) rack (>= 1.0, < 3) - rails (5.2.6) - actioncable (= 5.2.6) - actionmailer (= 5.2.6) - actionpack (= 5.2.6) - actionview (= 5.2.6) - activejob (= 5.2.6) - activemodel (= 5.2.6) - activerecord (= 5.2.6) - activestorage (= 5.2.6) - activesupport (= 5.2.6) + rails (6.0.0) + actioncable (= 6.0.0) + actionmailbox (= 6.0.0) + actionmailer (= 6.0.0) + actionpack (= 6.0.0) + actiontext (= 6.0.0) + actionview (= 6.0.0) + activejob (= 6.0.0) + activemodel (= 6.0.0) + activerecord (= 6.0.0) + activestorage (= 6.0.0) + activesupport (= 6.0.0) bundler (>= 1.3.0) - railties (= 5.2.6) + railties (= 6.0.0) sprockets-rails (>= 2.0.0) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) @@ -119,12 +140,12 @@ GEM nokogiri (>= 1.6) rails-html-sanitizer (1.4.2) loofah (~> 2.3) - railties (5.2.6) - actionpack (= 5.2.6) - activesupport (= 5.2.6) + railties (6.0.0) + actionpack (= 6.0.0) + activesupport (= 6.0.0) method_source rake (>= 0.8.7) - thor (>= 0.19.0, < 2.0) + thor (>= 0.20.3, < 2.0) raindrops (0.20.0) rake (13.0.6) rb-fsevent (0.11.0) @@ -149,13 +170,13 @@ GEM rdoc (>= 5.0) simple-navigation (4.3.0) activesupport (>= 2.3.2) - spring (2.1.1) - sprockets (3.7.2) + spring (4.0.0) + sprockets (4.0.2) concurrent-ruby (~> 1.0) rack (> 1, < 3) - sprockets-rails (3.2.2) - actionpack (>= 4.0) - activesupport (>= 4.0) + sprockets-rails (3.4.2) + actionpack (>= 5.2) + activesupport (>= 5.2) sprockets (>= 3.0.0) sqlite3 (1.3.13) temple (0.8.2) @@ -178,14 +199,15 @@ GEM unicorn-rails (2.2.1) rack unicorn - web-console (3.7.0) - actionview (>= 5.0) - activemodel (>= 5.0) + web-console (4.2.0) + actionview (>= 6.0.0) + activemodel (>= 6.0.0) bindex (>= 0.4.0) - railties (>= 5.0) + railties (>= 6.0.0) websocket-driver (0.7.5) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) + zeitwerk (2.5.1) PLATFORMS ruby @@ -200,7 +222,7 @@ DEPENDENCIES listen mysql2 pg - rails (= 5.2.6) + rails (= 6.0.0) rails-controller-testing responders sass-rails diff --git a/app/assets/config/manifest.js b/app/assets/config/manifest.js new file mode 100644 index 0000000..dee1cab --- /dev/null +++ b/app/assets/config/manifest.js @@ -0,0 +1,4 @@ +//= link_tree ../images +//= link_directory ../javascripts .js +//= link_directory ../stylesheets .css + diff --git a/bin/setup b/bin/setup index 94fd4d7..5853b5e 100755 --- a/bin/setup +++ b/bin/setup @@ -1,6 +1,5 @@ #!/usr/bin/env ruby require 'fileutils' -include FileUtils # path to your application root. APP_ROOT = File.expand_path('..', __dir__) @@ -9,24 +8,25 @@ def system!(*args) system(*args) || abort("\n== Command #{args} failed ==") end -chdir APP_ROOT do - # This script is a starting point to setup your application. +FileUtils.chdir APP_ROOT do + # This script is a way to setup or update your development environment automatically. + # This script is idempotent, so that you can run it at anytime and get an expectable outcome. # Add necessary setup steps to this file. puts '== Installing dependencies ==' system! 'gem install bundler --conservative' system('bundle check') || system!('bundle install') - # Install JavaScript dependencies if using Yarn + # Install JavaScript dependencies # system('bin/yarn') # puts "\n== Copying sample files ==" # unless File.exist?('config/database.yml') - # cp 'config/database.yml.sample', 'config/database.yml' + # FileUtils.cp 'config/database.yml.sample', 'config/database.yml' # end puts "\n== Preparing database ==" - system! 'bin/rails db:setup' + system! 'bin/rails db:prepare' puts "\n== Removing old logs and tempfiles ==" system! 'bin/rails log:clear tmp:clear' diff --git a/config/cable.yml b/config/cable.yml index 4aab60d..1bb47b2 100644 --- a/config/cable.yml +++ b/config/cable.yml @@ -2,7 +2,7 @@ development: adapter: async test: - adapter: async + adapter: test production: adapter: redis diff --git a/config/environments/development.rb b/config/environments/development.rb index 1311e3e..c5e5b36 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -1,6 +1,8 @@ Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. + config.hosts << "frl" + # In the development environment your application's code is reloaded on # every request. This slows down response time but is perfect for development # since you don't have to restart the web server when you make code changes. @@ -16,6 +18,7 @@ Rails.application.configure do # Run rails dev:cache to toggle caching. if Rails.root.join('tmp', 'caching-dev.txt').exist? config.action_controller.perform_caching = true + config.action_controller.enable_fragment_cache_logging = true config.cache_store = :memory_store config.public_file_server.headers = { @@ -27,7 +30,7 @@ Rails.application.configure do config.cache_store = :null_store end - # Store uploaded files on the local file system (see config/storage.yml for options) + # Store uploaded files on the local file system (see config/storage.yml for options). config.active_storage.service = :local # Don't care if the mailer can't send. @@ -52,7 +55,7 @@ Rails.application.configure do # Suppress logger output for asset requests. config.assets.quiet = true - # Raises error for missing translations + # Raises error for missing translations. # config.action_view.raise_on_missing_translations = true # Use an evented file watcher to asynchronously detect changes in source code, diff --git a/config/environments/production.rb b/config/environments/production.rb index 142f2e7..7ba88cc 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -22,15 +22,12 @@ Rails.application.configure do # Apache or NGINX already handles this. config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present? - # Compress JavaScripts and CSS. - config.assets.js_compressor = :uglifier + # Compress CSS using a preprocessor. # config.assets.css_compressor = :sass # Do not fallback to assets pipeline if a precompiled asset is missed. config.assets.compile = false - # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb - # Enable serving of images, stylesheets, and JavaScripts from an asset server. # config.action_controller.asset_host = 'http://assets.example.com' @@ -38,10 +35,10 @@ Rails.application.configure do # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX - # Store uploaded files on the local file system (see config/storage.yml for options) + # Store uploaded files on the local file system (see config/storage.yml for options). config.active_storage.service = :local - # Mount Action Cable outside main process or domain + # Mount Action Cable outside main process or domain. # config.action_cable.mount_path = nil # config.action_cable.url = 'wss://example.com/cable' # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ] @@ -59,9 +56,9 @@ Rails.application.configure do # Use a different cache store in production. # config.cache_store = :mem_cache_store - # Use a real queuing backend for Active Job (and separate queues per environment) + # Use a real queuing backend for Active Job (and separate queues per environment). # config.active_job.queue_adapter = :resque - # config.active_job.queue_name_prefix = "ecs4_#{Rails.env}" + # config.active_job.queue_name_prefix = "ecs4_production" config.action_mailer.perform_caching = false @@ -91,4 +88,25 @@ Rails.application.configure do # Do not dump schema after migrations. config.active_record.dump_schema_after_migration = false + + # Inserts middleware to perform automatic connection switching. + # The `database_selector` hash is used to pass options to the DatabaseSelector + # middleware. The `delay` is used to determine how long to wait after a write + # to send a subsequent read to the primary. + # + # The `database_resolver` class is used by the middleware to determine which + # database is appropriate to use based on the time delay. + # + # The `database_resolver_context` class is used by the middleware to set + # timestamps for the last write to the primary. The resolver uses the context + # class timestamps to determine how long to wait before reading from the + # replica. + # + # By default Rails will store a last write timestamp in the session. The + # DatabaseSelector middleware is designed as such you can define your own + # strategy for connection switching and pass that into the middleware through + # these configuration options. + # config.active_record.database_selector = { delay: 2.seconds } + # config.active_record.database_resolver = ActiveRecord::Middleware::DatabaseSelector::Resolver + # config.active_record.database_resolver_context = ActiveRecord::Middleware::DatabaseSelector::Resolver::Session end diff --git a/config/environments/test.rb b/config/environments/test.rb index 0a38fd3..4e9d6d5 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -1,10 +1,11 @@ +# The test environment is used exclusively to run your application's +# test suite. You never need to work with it otherwise. Remember that +# your test database is "scratch space" for the test suite and is wiped +# and recreated between test runs. Don't rely on the data there! + Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. - - # The test environment is used exclusively to run your application's - # test suite. You never need to work with it otherwise. Remember that - # your test database is "scratch space" for the test suite and is wiped - # and recreated between test runs. Don't rely on the data there! + config.cache_classes = true # Do not eager load code on boot. This avoids loading your whole application @@ -21,6 +22,7 @@ Rails.application.configure do # Show full error reports and disable caching. config.consider_all_requests_local = true config.action_controller.perform_caching = false + config.cache_store = :null_store # Raise exceptions instead of rendering exception templates. config.action_dispatch.show_exceptions = false @@ -28,7 +30,7 @@ Rails.application.configure do # Disable request forgery protection in test environment. config.action_controller.allow_forgery_protection = false - # Store uploaded files on the local file system in a temporary directory + # Store uploaded files on the local file system in a temporary directory. config.active_storage.service = :test config.action_mailer.perform_caching = false @@ -41,6 +43,6 @@ Rails.application.configure do # Print deprecation notices to the stderr. config.active_support.deprecation = :stderr - # Raises error for missing translations + # Raises error for missing translations. # config.action_view.raise_on_missing_translations = true end diff --git a/config/initializers/content_security_policy.rb b/config/initializers/content_security_policy.rb index d3bcaa5..35d0f26 100644 --- a/config/initializers/content_security_policy.rb +++ b/config/initializers/content_security_policy.rb @@ -11,6 +11,8 @@ # policy.object_src :none # policy.script_src :self, :https # policy.style_src :self, :https +# # If you are using webpack-dev-server then specify webpack-dev-server host +# policy.connect_src :self, :https, "http://localhost:3035", "ws://localhost:3035" if Rails.env.development? # # Specify URI for violation reports # # policy.report_uri "/csp-violation-report-endpoint" @@ -19,6 +21,9 @@ # If you are using UJS then enable automatic nonce generation # Rails.application.config.content_security_policy_nonce_generator = -> request { SecureRandom.base64(16) } +# Set the nonce only to specific directives +# Rails.application.config.content_security_policy_nonce_directives = %w(script-src) + # Report CSP violations to a specified URI # For further information see the following documentation: # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only diff --git a/config/initializers/new_framework_defaults_6_0.rb b/config/initializers/new_framework_defaults_6_0.rb new file mode 100644 index 0000000..8c818f2 --- /dev/null +++ b/config/initializers/new_framework_defaults_6_0.rb @@ -0,0 +1,45 @@ +# Be sure to restart your server when you modify this file. +# +# This file contains migration options to ease your Rails 6.0 upgrade. +# +# Once upgraded flip defaults one by one to migrate to the new default. +# +# Read the Guide for Upgrading Ruby on Rails for more info on each option. + +# Don't force requests from old versions of IE to be UTF-8 encoded. +Rails.application.config.action_view.default_enforce_utf8 = false + +# Embed purpose and expiry metadata inside signed and encrypted +# cookies for increased security. +# +# This option is not backwards compatible with earlier Rails versions. +# It's best enabled when your entire app is migrated and stable on 6.0. +Rails.application.config.action_dispatch.use_cookies_with_metadata = true + +# Change the return value of `ActionDispatch::Response#content_type` to Content-Type header without modification. +Rails.application.config.action_dispatch.return_only_media_type_on_content_type = false + +# Return false instead of self when enqueuing is aborted from a callback. +Rails.application.config.active_job.return_false_on_aborted_enqueue = true + +# Send Active Storage analysis and purge jobs to dedicated queues. +# Rails.application.config.active_storage.queues.analysis = :active_storage_analysis +Rails.application.config.active_storage.queues.purge = :active_storage_purge + +# When assigning to a collection of attachments declared via `has_many_attached`, replace existing +# attachments instead of appending. Use #attach to add new attachments without replacing existing ones. +Rails.application.config.active_storage.replace_on_assign_to_many = true + +# Use ActionMailer::MailDeliveryJob for sending parameterized and normal mail. +# +# The default delivery jobs (ActionMailer::Parameterized::DeliveryJob, ActionMailer::DeliveryJob), +# will be removed in Rails 6.1. This setting is not backwards compatible with earlier Rails versions. +# If you send mail in the background, job workers need to have a copy of +# MailDeliveryJob to ensure all delivery jobs are processed properly. +# Make sure your entire app is migrated and stable on 6.0 before using this setting. +Rails.application.config.action_mailer.delivery_job = "ActionMailer::MailDeliveryJob" + +# Enable the same cache key to be reused when the object being cached of type +# `ActiveRecord::Relation` changes by moving the volatile information (max updated at and count) +# of the relation's cache key into the cache version to support recycling cache key. +Rails.application.config.active_record.collection_cache_versioning = true diff --git a/config/locales/en.yml b/config/locales/en.yml index decc5a8..cf9b342 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -27,7 +27,7 @@ # 'true': 'foo' # # To learn more, please read the Rails Internationalization guide -# available at http://guides.rubyonrails.org/i18n.html. +# available at https://guides.rubyonrails.org/i18n.html. en: hello: "Hello world" diff --git a/db/schema.rb b/db/schema.rb index 589638c..86185a7 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -2,144 +2,144 @@ # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. # -# Note that this schema.rb definition is the authoritative source for your -# database schema. If you need to create the application database on another -# system, you should be using db:schema:load, not running all the migrations -# from scratch. The latter is a flawed and unsustainable approach (the more migrations -# you'll amass, the slower it'll run and the greater likelihood for issues). +# This file is the source Rails uses to define your schema when running `rails +# db:schema:load`. When creating a new database, `rails db:schema:load` tends to +# be faster and is potentially less error prone than running all of your +# migrations from scratch. Old migrations may fail to apply correctly if those +# migrations use external dependencies or application code. # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20180228115911) do +ActiveRecord::Schema.define(version: 2018_02_28_115911) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" - create_table "auths", force: :cascade do |t| - t.string "one_touch_hash", limit: 255 - t.integer "message_id" + create_table "auths", id: :serial, force: :cascade do |t| + t.string "one_touch_hash", limit: 255 + t.integer "message_id" t.datetime "created_at" t.datetime "updated_at" end - create_table "communities", force: :cascade do |t| - t.string "name", limit: 255 - t.text "description" + create_table "communities", id: :serial, force: :cascade do |t| + t.string "name", limit: 255 + t.text "description" t.datetime "created_at" t.datetime "updated_at" end - create_table "community_messages", force: :cascade do |t| - t.integer "community_id" - t.integer "message_id" + create_table "community_messages", id: :serial, force: :cascade do |t| + t.integer "community_id" + t.integer "message_id" t.datetime "created_at" t.datetime "updated_at" end - create_table "ev_types", force: :cascade do |t| - t.string "name", limit: 255 + create_table "ev_types", id: :serial, force: :cascade do |t| + t.string "name", limit: 255 t.datetime "created_at" t.datetime "updated_at" end - create_table "events", force: :cascade do |t| - t.integer "participant_id" - t.integer "message_id" - t.integer "ev_type_id" + create_table "events", id: :serial, force: :cascade do |t| + t.integer "participant_id" + t.integer "message_id" + t.integer "ev_type_id" t.datetime "created_at" t.datetime "updated_at" - t.integer "lock_version", default: 0 - t.index ["message_id"], name: "index_events_on_message_id", using: :btree - t.index ["participant_id"], name: "index_events_on_participant_id", using: :btree + t.integer "lock_version", default: 0 + t.index ["message_id"], name: "index_events_on_message_id" + t.index ["participant_id"], name: "index_events_on_participant_id" end - create_table "identities", force: :cascade do |t| - t.integer "participant_id" - t.string "name", limit: 255 - t.text "description" + create_table "identities", id: :serial, force: :cascade do |t| + t.integer "participant_id" + t.string "name", limit: 255 + t.text "description" t.datetime "created_at" t.datetime "updated_at" end - create_table "membership_messages", force: :cascade do |t| - t.integer "membership_id" - t.integer "message_id" + create_table "membership_messages", id: :serial, force: :cascade do |t| + t.integer "membership_id" + t.integer "message_id" t.datetime "created_at" t.datetime "updated_at" - t.integer "lock_version", default: 0 - t.index ["message_id"], name: "index_membership_messages_on_message_id", using: :btree + t.integer "lock_version", default: 0 + t.index ["message_id"], name: "index_membership_messages_on_message_id" end - create_table "memberships", force: :cascade do |t| - t.integer "participant_id" - t.integer "community_id" + create_table "memberships", id: :serial, force: :cascade do |t| + t.integer "participant_id" + t.integer "community_id" t.datetime "created_at" t.datetime "updated_at" end - create_table "messages", force: :cascade do |t| - t.string "content_type", limit: 255 - t.integer "sender" - t.text "body" - t.integer "ressource_id" + create_table "messages", id: :serial, force: :cascade do |t| + t.string "content_type", limit: 255 + t.integer "sender" + t.text "body" + t.integer "ressource_id" t.datetime "created_at" t.datetime "updated_at" - t.boolean "removed", default: false + t.boolean "removed", default: false end - create_table "organizations", force: :cascade do |t| - t.string "name", limit: 255 - t.text "description" - t.string "abrev", limit: 255 + create_table "organizations", id: :serial, force: :cascade do |t| + t.string "name", limit: 255 + t.text "description" + t.string "abrev", limit: 255 t.datetime "created_at" t.datetime "updated_at" end - create_table "participants", force: :cascade do |t| - t.string "name", limit: 255 - t.string "dns", limit: 255 - t.string "email", limit: 255 - t.text "description" - t.integer "organization_id" + create_table "participants", id: :serial, force: :cascade do |t| + t.string "name", limit: 255 + t.string "dns", limit: 255 + t.string "email", limit: 255 + t.text "description" + t.integer "organization_id" t.datetime "ttl" - t.boolean "anonymous", default: false, null: false + t.boolean "anonymous", default: false, null: false t.datetime "created_at" t.datetime "updated_at" - t.boolean "community_selfrouting", default: false - t.boolean "events_", default: true - t.string "ptype" + t.boolean "community_selfrouting", default: false + t.boolean "events_", default: true + t.string "ptype" end - create_table "ressource_monitors", force: :cascade do |t| - t.integer "lock_version", default: 0 - t.integer "monitor_counter", default: 0 - t.string "name", limit: 255 + create_table "ressource_monitors", id: :serial, force: :cascade do |t| + t.integer "lock_version", default: 0 + t.integer "monitor_counter", default: 0 + t.string "name", limit: 255 t.datetime "created_at" t.datetime "updated_at" end - create_table "ressources", force: :cascade do |t| - t.string "namespace", limit: 255 - t.string "ressource", limit: 255 - t.boolean "postroute", default: false + create_table "ressources", id: :serial, force: :cascade do |t| + t.string "namespace", limit: 255 + t.string "ressource", limit: 255 + t.boolean "postroute", default: false t.datetime "created_at" t.datetime "updated_at" - t.boolean "events", default: true + t.boolean "events", default: true end - create_table "sessions", force: :cascade do |t| - t.string "session_id", limit: 255, null: false - t.text "data" + create_table "sessions", id: :serial, force: :cascade do |t| + t.string "session_id", limit: 255, null: false + t.text "data" t.datetime "created_at" t.datetime "updated_at" - t.index ["session_id"], name: "index_sessions_on_session_id", using: :btree - t.index ["updated_at"], name: "index_sessions_on_updated_at", using: :btree + t.index ["session_id"], name: "index_sessions_on_session_id" + t.index ["updated_at"], name: "index_sessions_on_updated_at" end - create_table "subparticipants", force: :cascade do |t| - t.integer "participant_id" - t.integer "parent_id" - t.string "realm" + create_table "subparticipants", id: :serial, force: :cascade do |t| + t.integer "participant_id" + t.integer "parent_id" + t.string "realm" t.datetime "created_at" t.datetime "updated_at" end -- cgit v1.2.3