diff --git a/.gitignore b/.gitignore index 9b310bf..89a20b3 100644 --- a/.gitignore +++ b/.gitignore @@ -37,6 +37,7 @@ config/secrets.yml .svn .project .secret +.vagrant config/database.yml log/**/* tmp/**/* diff --git a/Gemfile b/Gemfile index 7d845e3..d3e11b8 100644 --- a/Gemfile +++ b/Gemfile @@ -30,21 +30,18 @@ end # For locale in the route gem "daemons" -gem 'delayed_job' +gem 'delayed_job' gem 'delayed_job_active_record' - gem "figaro" - gem 'geocoder' gem "select2-rails", '3.5.9.3' gem 'country_select', github: 'stefanpenner/country_select' +gem 'planner-core', path: "../planner-core" +gem 'planner_konopas', path: "../planner_konopas" -# gem 'planner-core', path: "../planner-core" -# gem 'planner_konopas', path: "../planner_konopas" - -gem 'planner-core', '>=0.1', :git => 'git@github.com:conferenceplan/planner-core.git' -gem 'planner_konopas', '>=0.1', :git => 'git@github.com:conferenceplan/planner_konopas.git' +# gem 'planner-core', '>=0.1', :git => 'git@github.com:conferenceplan/planner-core.git' +# gem 'planner_konopas', '>=0.1', :git => 'git@github.com:conferenceplan/planner_konopas.git' # Needed for the new asset pipeline group :assets do @@ -58,3 +55,7 @@ end group :development do gem 'seed_dump', '0.5.3' end + +group :test do + gem 'test-unit', '~> 3.0' +end \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock index 867b9fd..cd14c8e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -35,11 +35,10 @@ GIT i18n-active_record (0.0.2) i18n (>= 0.6.0) -GIT - remote: git@github.com:conferenceplan/planner-core.git - revision: f199fddb5dae6bc5fec2811ede627bf403acf53f +PATH + remote: ../planner-core specs: - planner-core (0.8.50) + planner-core (0.8.76) actionmailer activerecord acts-as-taggable-on (= 3.1.1) @@ -73,7 +72,6 @@ GIT jquery-rails (= 2.2.1) jquery-ui-rails (= 3.0.1) log4r - momentjs-rails (>= 2.9.0) prawn-table prawn_rails rails (~> 3.2.17) @@ -87,9 +85,8 @@ GIT twitter-typeahead-rails will_paginate -GIT - remote: git@github.com:conferenceplan/planner_konopas.git - revision: 7824d4a01a7f1a1e11bcd17ad5dc8838483c5b13 +PATH + remote: ../planner_konopas specs: planner_konopas (0.2.17) devise @@ -152,7 +149,7 @@ GEM sass (~> 3.2) bootstrap3-datetimepicker-rails (4.7.14) momentjs-rails (>= 2.8.1) - browser (1.0.1) + browser (1.1.0) builder (3.0.4) cancancan (1.13.1) carrierwave (0.10.0) @@ -167,7 +164,7 @@ GEM chunky_png (1.3.5) ckeditor_rails (4.4.7) railties (>= 3.0) - cloudinary (1.1.1) + cloudinary (1.1.2) aws_cf_signer rest-client coffee-rails (3.2.2) @@ -198,10 +195,10 @@ GEM currencies (~> 0.4.2) i18n_data (~> 0.7.0) currencies (0.4.2) - d3_rails (3.5.10) + d3_rails (3.5.11) railties (>= 3.1.0) daemons (1.2.3) - dalli (2.7.4) + dalli (2.7.5) declarative_authorization (0.5.7) deep_cloneable (1.6.1) activerecord (>= 3.1.0) @@ -210,7 +207,7 @@ GEM delayed_job_active_record (4.1.0) activerecord (>= 3.0, < 5) delayed_job (>= 3.0, < 5) - devise (3.5.2) + devise (3.5.3) bcrypt (~> 3.0) orm_adapter (~> 0.1) railties (>= 3.2.6, < 5) @@ -243,8 +240,8 @@ GEM http_accept_language (2.0.5) i18n (0.7.0) i18n_data (0.7.0) - jbuilder (2.3.2) - activesupport (>= 3.0.0, < 5) + jbuilder (2.4.0) + activesupport (>= 3.0.0, < 5.1) multi_json (~> 1.2) journey (1.0.4) jpbuilder (0.2.5) @@ -268,7 +265,7 @@ GEM treetop (~> 1.4.8) mime-types (1.25.1) mini_portile (0.6.0) - momentjs-rails (2.10.6) + momentjs-rails (2.11.0) railties (>= 3.1) multi_json (1.11.2) mysql2 (0.3.20) @@ -278,6 +275,7 @@ GEM orm_adapter (0.5.0) pdf-core (0.6.0) polyglot (0.3.5) + power_assert (0.2.2) prawn (2.0.2) pdf-core (~> 0.6.0) ttfunk (~> 1.4.0) @@ -346,6 +344,8 @@ GEM multi_json (~> 1.0) rack (~> 1.0) tilt (~> 1.1, != 1.3.0) + test-unit (3.0.8) + power_assert therubyracer (0.12.2) libv8 (~> 3.16.14.0) ref @@ -377,9 +377,9 @@ GEM unf_ext unf_ext (0.0.7.1) unicode_utils (1.4.0) - warden (1.2.3) + warden (1.2.4) rack (>= 1.0) - will_paginate (3.0.7) + will_paginate (3.1.0) ya2yaml (0.31) yui-compressor (0.12.0) @@ -403,15 +403,19 @@ DEPENDENCIES libv8 (= 3.16.14.7) mysql2 (= 0.3.20) nokogiri (= 1.6.2.1) - planner-core (>= 0.1)! - planner_konopas (>= 0.1)! + planner-core! + planner_konopas! puma rack (= 1.4.5) rake sass-rails (>= 3.2) seed_dump (= 0.5.3) select2-rails (= 3.5.9.3) + test-unit (~> 3.0) therubyracer turbo-sprockets-rails3 uglifier (= 2.5.1) yui-compressor + +BUNDLED WITH + 1.11.2 diff --git a/Vagrantfile b/Vagrantfile new file mode 100644 index 0000000..6f81db8 --- /dev/null +++ b/Vagrantfile @@ -0,0 +1,34 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +VAGRANTFILE_API_VERSION = "2" + +Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| + # Use Ubuntu 14.04 Trusty Tahr 64-bit as our operating system + config.vm.box = "ubuntu/trusty64" + config.vm.hostname = "planner-web" + + # Configurate the virtual machine to use 2GB of RAM + config.vm.provider "virtualbox" do |v| + v.memory = 2096 + v.cpus = 2 + end + + config.ssh.forward_agent = true + + # Forward the Rails server default port to the host + config.vm.network :forwarded_port, guest: 3000, host: 3001, auto_correct: true + config.vm.network :forwarded_port, guest: 3306, host: 3306, auto_correct: true + + # Create a private network, which allows host-only access to the machine + # using a specific IP. + config.vm.network "private_network", ip: "192.168.99.90" + + # Share an additional folder to the guest VM. The first argument is + # the path on the host to the actual folder. The second argument is + # the path on the guest to mount the folder. And the optional third + # argument is a set of non-required options. + config.vm.synced_folder ".", "/planner-web", type: "nfs" + config.vm.synced_folder "../planner-core", "/planner-core", type: "nfs" + config.vm.synced_folder "../planner_konopas", "/planner_konopas", type: "nfs" +end \ No newline at end of file diff --git a/ansible.cfg b/ansible.cfg new file mode 100644 index 0000000..ec15f5e --- /dev/null +++ b/ansible.cfg @@ -0,0 +1,5 @@ +[defaults] +hostfile = ansible/hosts +remote_user = vagrant +private_key_file = .vagrant/machines/default/virtualbox/private_key +host_key_checking = False \ No newline at end of file diff --git a/ansible/hosts b/ansible/hosts new file mode 100644 index 0000000..ab298e5 --- /dev/null +++ b/ansible/hosts @@ -0,0 +1,2 @@ +[vagrant] +devserver ansible_ssh_host=127.0.0.1 ansible_ssh_port=2222 \ No newline at end of file diff --git a/ansible/roles/core/defaults/main.yml b/ansible/roles/core/defaults/main.yml new file mode 100644 index 0000000..52bfdad --- /dev/null +++ b/ansible/roles/core/defaults/main.yml @@ -0,0 +1,2 @@ +--- + home_dir: /home/vagrant \ No newline at end of file diff --git a/ansible/roles/core/tasks/git.yml b/ansible/roles/core/tasks/git.yml new file mode 100644 index 0000000..02b59e1 --- /dev/null +++ b/ansible/roles/core/tasks/git.yml @@ -0,0 +1,3 @@ +--- + - name: Install git + apt: "pkg=git-core state=installed update_cache=yes" diff --git a/ansible/roles/core/tasks/locales.yml b/ansible/roles/core/tasks/locales.yml new file mode 100644 index 0000000..9ff30e8 --- /dev/null +++ b/ansible/roles/core/tasks/locales.yml @@ -0,0 +1,6 @@ +--- +- name: Install language pack + shell: "{{ item }}" + with_items: + - locale-gen en_US.UTF-8 + - dpkg-reconfigure locales \ No newline at end of file diff --git a/ansible/roles/core/tasks/main.yml b/ansible/roles/core/tasks/main.yml new file mode 100644 index 0000000..2007df2 --- /dev/null +++ b/ansible/roles/core/tasks/main.yml @@ -0,0 +1,5 @@ +--- +- include: git.yml +- include: ruby.yml +- include: locales.yml +- include: ntp.yml \ No newline at end of file diff --git a/ansible/roles/core/tasks/ntp.yml b/ansible/roles/core/tasks/ntp.yml new file mode 100644 index 0000000..8169e94 --- /dev/null +++ b/ansible/roles/core/tasks/ntp.yml @@ -0,0 +1,3 @@ +--- + - name: Install ntp + apt: "pkg=ntp state=installed update_cache=yes" diff --git a/ansible/roles/core/tasks/ruby.yml b/ansible/roles/core/tasks/ruby.yml new file mode 100644 index 0000000..694884d --- /dev/null +++ b/ansible/roles/core/tasks/ruby.yml @@ -0,0 +1,38 @@ +--- + - name: Install list of dependency packages for Ruby + apt: "pkg={{ item }} state=installed update_cache=yes" + with_items: + - g++ + - curl + - zlib1g-dev + - libssl-dev + - build-essential + - libreadline-dev + - libyaml-dev + - libxml2-dev + - libxslt1-dev + - libcurl4-openssl-dev + - python-software-properties + - libffi-dev + - libqtwebkit-dev + - qt4-qmake + - ghostscript + - name: Get currently installed ruby version + command: ruby -v + register: result + ignore_errors: True + - name: Download Ruby Source + get_url: url=https://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.3.tar.gz dest={{ home_dir }}/ruby-2.2.3.tar.gz force=no + - name: Install Ruby + shell: "{{ item }}" + with_items: + - cd + - cd {{ home_dir }}; tar -xzvf ruby-2.2.3.tar.gz + - cd {{ home_dir }}/ruby-2.2.3/; sudo ./configure + - cd {{ home_dir }}/ruby-2.2.3/; sudo make + - cd {{ home_dir }}/ruby-2.2.3/; sudo make install + when: result.rc !=0 or result.stdout.split()[1] != '2.2.3p173' + - name: Install bundler + shell: "{{ item }}" + with_items: + - sudo gem install bundler diff --git a/ansible/roles/database/defaults/main.yml b/ansible/roles/database/defaults/main.yml new file mode 100644 index 0000000..aebdf28 --- /dev/null +++ b/ansible/roles/database/defaults/main.yml @@ -0,0 +1,2 @@ +--- + mysql_root_pass: '123456' \ No newline at end of file diff --git a/ansible/roles/database/handlers/main.yml b/ansible/roles/database/handlers/main.yml new file mode 100644 index 0000000..609992c --- /dev/null +++ b/ansible/roles/database/handlers/main.yml @@ -0,0 +1,3 @@ +--- + - name: Restart MySQL + service: name=mysql state=restarted \ No newline at end of file diff --git a/ansible/roles/database/tasks/main.yml b/ansible/roles/database/tasks/main.yml new file mode 100644 index 0000000..e1c322b --- /dev/null +++ b/ansible/roles/database/tasks/main.yml @@ -0,0 +1,27 @@ +--- + - name: Install the MySQL packages + apt: name={{ item }} state=installed update_cache=yes + with_items: + - mysql-server-5.6 + - mysql-client-5.6 + - python-mysqldb + - libmysqlclient-dev + + - name: Copy the configuration file (my.cnf) + template: src=my.cnf.j2 dest=/etc/mysql/my.cnf + notify: + - Restart MySQL + + - name: Copy the root credentials as .my.cnf file + template: src=root.cnf.j2 dest=~/.my.cnf mode=0600 + + - name: Ensure Anonymous user(s) are not in the database + mysql_user: name='' host={{ item }} state=absent + with_items: + - localhost + - "{{ host_name }}" + + - name: Remove the test database + mysql_db: name=test state=absent + notify: + - Restart MySQL \ No newline at end of file diff --git a/ansible/roles/database/templates/my.cnf.j2 b/ansible/roles/database/templates/my.cnf.j2 new file mode 100644 index 0000000..eb1121d --- /dev/null +++ b/ansible/roles/database/templates/my.cnf.j2 @@ -0,0 +1,127 @@ +# +# The MySQL database server configuration file. +# +# You can copy this to one of: +# - "/etc/mysql/my.cnf" to set global options, +# - "~/.my.cnf" to set user-specific options. +# +# One can use all long options that the program supports. +# Run program with --help to get a list of available options and with +# --print-defaults to see which it would actually understand and use. +# +# For explanations see +# http://dev.mysql.com/doc/mysql/en/server-system-variables.html + +# This will be passed to all mysql clients +# It has been reported that passwords should be enclosed with ticks/quotes +# escpecially if they contain "#" chars... +# Remember to edit /etc/mysql/debian.cnf when changing the socket location. +[client] +port = 3306 +socket = /var/run/mysqld/mysqld.sock + +# Here is entries for some specific programs +# The following values assume you have at least 32M ram + +# This was formally known as [safe_mysqld]. Both versions are currently parsed. +[mysqld_safe] +socket = /var/run/mysqld/mysqld.sock +nice = 0 + +[mysqld] +# +# * Basic Settings +# +user = mysql +pid-file = /var/run/mysqld/mysqld.pid +socket = /var/run/mysqld/mysqld.sock +port = 3306 +basedir = /usr +datadir = /var/lib/mysql +tmpdir = /tmp +lc-messages-dir = /usr/share/mysql +skip-external-locking +# +# Instead of skip-networking the default is now to listen only on +# localhost which is more compatible and is not less secure. +bind-address = 0.0.0.0 +# +# * Fine Tuning +# +key_buffer = 16M +max_allowed_packet = 16M +thread_stack = 192K +thread_cache_size = 8 +# This replaces the startup script and checks MyISAM tables if needed +# the first time they are touched +myisam-recover = BACKUP +#max_connections = 100 +#table_cache = 64 +#thread_concurrency = 10 +# +# * Query Cache Configuration +# +query_cache_limit = 1M +query_cache_size = 16M +# +# * Logging and Replication +# +# Both location gets rotated by the cronjob. +# Be aware that this log type is a performance killer. +# As of 5.1 you can enable the log at runtime! +#general_log_file = /var/log/mysql/mysql.log +#general_log = 1 +# +# Error log - should be very few entries. +# +log_error = /var/log/mysql/error.log +# +# Here you can see queries with especially long duration +#log_slow_queries = /var/log/mysql/mysql-slow.log +#long_query_time = 2 +#log-queries-not-using-indexes +# +# The following can be used as easy to replay backup logs or for replication. +# note: if you are setting up a replication slave, see README.Debian about +# other settings you may need to change. +#server-id = 1 +#log_bin = /var/log/mysql/mysql-bin.log +expire_logs_days = 10 +max_binlog_size = 100M +#binlog_do_db = include_database_name +#binlog_ignore_db = include_database_name +# +# * InnoDB +# +# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/. +# Read the manual for more InnoDB related options. There are many! +# +# * Security Features +# +# Read the manual, too, if you want chroot! +# chroot = /var/lib/mysql/ +# +# For generating SSL certificates I recommend the OpenSSL GUI "tinyca". +# +# ssl-ca=/etc/mysql/cacert.pem +# ssl-cert=/etc/mysql/server-cert.pem +# ssl-key=/etc/mysql/server-key.pem + + + +[mysqldump] +quick +quote-names +max_allowed_packet = 16M + +[mysql] +#no-auto-rehash # faster start of mysql but no tab completition + +[isamchk] +key_buffer = 16M + +# +# * IMPORTANT: Additional settings that can override those from this file! +# The files must end with '.cnf', otherwise they'll be ignored. +# +!includedir /etc/mysql/conf.d/ \ No newline at end of file diff --git a/ansible/roles/database/templates/root.cnf.j2 b/ansible/roles/database/templates/root.cnf.j2 new file mode 100644 index 0000000..239542e --- /dev/null +++ b/ansible/roles/database/templates/root.cnf.j2 @@ -0,0 +1,3 @@ +[client] +user=root +password={{ mysql_root_pass }} \ No newline at end of file diff --git a/ansible/roles/vagrant/files/.bash_profile b/ansible/roles/vagrant/files/.bash_profile new file mode 100644 index 0000000..2c53cc1 --- /dev/null +++ b/ansible/roles/vagrant/files/.bash_profile @@ -0,0 +1,18 @@ +parse_git_branch() { + git branch --color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\ →\ \1/' +} + +export PS1='\[\e[1;32m\]\u@\[\e[1;32m\]\h\[\e[1;37m\]:\[\e[1;36m\]\w\[\e[1;33m\]$(parse_git_branch) $ \[\e[0m\]' + +export LANG="en_US.UTF-8" +export LC_ALL="en_US.UTF-8" + +cd /planner-web + +if [ ! -f /tmp/.X10-lock ]; then + Xvfb :10 -screen 0 1366x768x24 -ac & +fi + +export DISPLAY=:10 + +export devise_key='8c46ea8c44439699e46b066d36157cc9e0b239a9d69ce8b18672802b286a0cd01fa783c912fdf490461753a594ac3e129dbbd119163fba56957ab441cab206ad' diff --git a/ansible/roles/vagrant/tasks/main.yml b/ansible/roles/vagrant/tasks/main.yml new file mode 100644 index 0000000..8ab23b9 --- /dev/null +++ b/ansible/roles/vagrant/tasks/main.yml @@ -0,0 +1,4 @@ +- name: Change bash_profile + copy: src=.bash_profile dest=/home/vagrant/.bash_profile +- name: Install xvfb + apt: "pkg=xvfb state=installed update_cache=yes" diff --git a/ansible/vagrant.yml b/ansible/vagrant.yml new file mode 100644 index 0000000..2f40e6e --- /dev/null +++ b/ansible/vagrant.yml @@ -0,0 +1,11 @@ +--- +- name: Configure Vagrant for development + hosts: vagrant + sudo: true + roles: + - role: core + - role: database + - role: vagrant + vars: + host_name: 'planner-web' + user_name: 'vagrant' \ No newline at end of file diff --git a/db/schema.rb b/db/schema.rb index 57c1e83..a28ae72 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,16 +11,17 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20140804171501) do +ActiveRecord::Schema.define(:version => 20160110213808) do create_table "addresses", :force => true do |t| t.integer "addressable_id" t.string "addressable_type" t.integer "person_id" t.boolean "isvalid" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "lock_version", :default => 0 + t.integer "venue_id" end add_index "addresses", ["addressable_id"], :name => "addr_id_index" @@ -31,8 +32,8 @@ t.integer "Survey_id" t.string "question" t.text "reply" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "lock_version", :default => 0 end @@ -61,8 +62,8 @@ t.datetime "start_time" t.datetime "end_time" t.integer "person_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "lock_version", :default => 0 end @@ -74,14 +75,43 @@ t.integer "lock_version", :default => 0 end + create_table "captcha_configs", :force => true do |t| + t.string "captcha_pub_key", :default => "" + t.string "captcha_priv_key", :default => "" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "lock_version", :default => 0 + end + + create_table "categories", :force => true do |t| + t.integer "category_name_id" + t.integer "categorized_id" + t.string "categorized_type" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "lock_version", :default => 0 + end + + add_index "categories", ["categorized_id", "categorized_type"], :name => "index_categories_on_categorized_id_and_categorized_type" + add_index "categories", ["categorized_id"], :name => "index_categories_on_categorized_id" + add_index "categories", ["category_name_id", "categorized_type"], :name => "index_categories_on_category_name_id_and_categorized_type" + add_index "categories", ["category_name_id"], :name => "index_categories_on_category_name_id" + + create_table "category_names", :force => true do |t| + t.string "name" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "lock_version", :default => 0 + end + create_table "change_logs", :force => true do |t| t.string "who" t.datetime "when" t.string "description" t.string "type" t.string "old_value" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false end create_table "cloudinary_configs", :force => true do |t| @@ -94,16 +124,6 @@ t.datetime "updated_at", :null => false end - create_table "conference_directories", :force => true do |t| - t.string "name" - t.string "code", :limit => 10 - t.string "endpoint", :limit => 300 - t.string "description", :limit => 2000 - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "lock_version", :default => 0 - end - create_table "conference_logos", :force => true do |t| t.string "image" t.datetime "created_at", :null => false @@ -132,19 +152,11 @@ add_index "content_images", ["gallery"], :name => "index_content_images_on_gallery" - create_table "customer_addresses", :force => true do |t| - t.integer "customer_id" - t.integer "postal_address_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "lock_version", :default => 0 - end - create_table "datasources", :force => true do |t| t.string "name" t.boolean "primary", :default => false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false end create_table "default_bio_images", :force => true do |t| @@ -163,8 +175,8 @@ t.datetime "locked_at" t.datetime "failed_at" t.string "locked_by" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.string "queue" end @@ -173,8 +185,8 @@ create_table "edited_bios", :force => true do |t| t.text "bio" t.integer "person_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "lock_version", :default => 0 t.text "website" t.text "twitterinfo" @@ -186,8 +198,8 @@ create_table "email_addresses", :force => true do |t| t.string "email", :default => "" t.boolean "isdefault" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "lock_version", :default => 0 end @@ -199,42 +211,43 @@ create_table "equipment", :force => true do |t| t.string "details" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "lock_version", :default => 0 t.integer "equipment_type_id" t.integer "room_id" end create_table "equipment_assignments", :force => true do |t| - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "lock_version", :default => 0 t.integer "programme_item_id" t.integer "equipment_id" end create_table "equipment_needs", :force => true do |t| - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "programme_item_id" t.integer "equipment_type_id" t.integer "lock_version", :default => 0 + t.integer "quantity", :default => 1 end add_index "equipment_needs", ["programme_item_id"], :name => "equip_item_id_index" create_table "equipment_types", :force => true do |t| t.string "description" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "lock_version", :default => 0 end create_table "excluded_items_survey_maps", :force => true do |t| t.integer "programme_item_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "lock_version", :default => 0 t.integer "survey_answer_id" end @@ -242,8 +255,8 @@ create_table "excluded_periods_survey_maps", :force => true do |t| t.integer "period_id" t.string "period_type" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "lock_version", :default => 0 t.integer "survey_answer_id" end @@ -252,8 +265,8 @@ t.integer "excludable_id" t.string "excludable_type" t.integer "person_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "lock_version", :default => 0 t.text "source" end @@ -268,11 +281,19 @@ t.integer "lock_version", :default => 0 end + create_table "features", :force => true do |t| + t.string "name" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "lock_version", :default => 0 + t.boolean "migrated", :default => false + end + create_table "formats", :force => true do |t| t.string "name" t.integer "position" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "lock_version", :default => 0 end @@ -298,13 +319,17 @@ t.datetime "created_at", :null => false t.datetime "updated_at", :null => false t.integer "lock_version", :default => 0 + t.integer "job_title", :default => -1 + t.integer "company", :default => -1 + t.integer "prefix", :default => -1 + t.integer "pub_prefix", :default => -1 end create_table "invitation_categories", :force => true do |t| t.string "name" t.integer "position" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "lock_version", :default => 0 end @@ -335,13 +360,24 @@ t.datetime "updated_at", :null => false end + create_table "links", :force => true do |t| + t.integer "linkedto_id" + t.string "linkedto_type" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "lock_version", :default => 0 + end + + add_index "links", ["linkedto_id", "linkedto_type"], :name => "index_links_on_linkedto_id_and_linkedto_type" + add_index "links", ["linkedto_id"], :name => "index_links_on_linkedto_id" + create_table "mail_configs", :force => true do |t| t.string "conference_name", :default => "" t.string "cc", :default => "" t.string "from", :default => "" t.string "domain", :default => "" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.string "info" t.string "test_email" t.string "reply_to" @@ -354,8 +390,8 @@ t.string "email" t.text "content" t.boolean "testrun", :default => false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "lock_version", :default => 0 t.integer "person_id" t.integer "mailing_id" @@ -367,8 +403,8 @@ t.string "subject", :default => "" t.text "content" t.integer "survey_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "lock_version", :default => 0 t.integer "transiton_invite_status_id" end @@ -378,89 +414,10 @@ t.integer "mail_template_id" t.boolean "scheduled" t.boolean "testrun", :default => false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "lock_version", :default => 0 - end - - create_table "mapped_survey_questions", :force => true do |t| - t.text "question" - t.text "code" - t.text "name" - t.datetime "created_at" - t.datetime "updated_at" - t.integer "lock_version", :default => 0 - end - - create_table "menu_items", :force => true do |t| - t.string "name", :default => "" - t.string "path", :default => "/" - t.integer "menu_id" - t.integer "menu_item_id" - t.datetime "created_at" - t.datetime "updated_at" - t.integer "lock_version", :default => 0 - end - - create_table "menus", :force => true do |t| - t.string "title", :default => "" - t.datetime "created_at" - t.datetime "updated_at" - t.integer "lock_version", :default => 0 - end - - create_table "messages", :force => true do |t| - t.integer "user_id" - t.text "message" - t.datetime "created_at" - t.datetime "updated_at" - end - - create_table "mobile_pages", :force => true do |t| - t.integer "position" - t.string "url" - t.string "title" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "lock_version", :default => 0 - t.boolean "use_url", :default => true - t.text "content" - end - - create_table "mobile_themes", :force => true do |t| - t.string "main_background", :default => "#e6e7e8" - t.string "action_bar_bg", :default => "#e6e7e8" - t.string "body_text", :default => "#333333" - t.string "body_text_secondary", :default => "#bbbbbb" - t.string "card_background", :default => "#ffffff" - t.string "updated_ribbon", :default => "#00ff00" - t.string "hot_ribbon", :default => "#ff0000" - t.string "favourite_on", :default => "#00adef" - t.string "card_shadow", :default => "#111111" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "favourite_on_bg", :default => "rgba(184,182,182,1)" - t.string "favourite_off_bg", :default => "rgba(184,182,182,1)" - t.string "favourite_off", :default => "rgba(184,182,182,1)" - t.string "hot_ribbon_text", :default => "rgba(184,182,182,1)" - t.string "new_ribbon", :default => "rgba(184,182,182,1)" - t.string "new_ribbon_text", :default => "rgba(184,182,182,1)" - t.string "item_name", :default => "rgba(184,182,182,1)" - t.string "action_bar_text", :default => "rgba(184,182,182,1)" - t.string "day_text", :default => "rgba(184,182,182,1)" - t.string "date_text", :default => "rgba(184,182,182,1)" - t.string "time_text", :default => "rgba(184,182,182,1)" - t.string "page_flipper_text", :default => "rgba(184,182,182,1)" - t.string "page_flipper_bg", :default => "rgba(184,182,182,1)" - t.string "page_flipper_separators", :default => "rgba(184,182,182,1)" - t.string "page_flipper_selection_bar", :default => "rgba(184,182,182,1)" - t.string "updated_ribbon_text", :default => "rgba(184,182,182,1)" - t.string "item_format", :default => "rgba(184,182,182,1)" - t.string "menu_drawer_bg", :default => "rgba(239,239,239,1)" - t.string "menu_drawer_selected", :default => "rgba(0,173,329,1)" - t.string "menu_drawer_text", :default => "rgba(35,31,32,1)" - t.string "name" - t.boolean "isdefault", :default => false + t.integer "last_person_idx", :default => -1 end create_table "pending_import_people", :force => true do |t| @@ -478,11 +435,11 @@ t.string "email", :default => "" t.string "registration_number" t.string "registration_type" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "lock_version", :default => 0 t.integer "datasource_id" - t.integer "datasource_dbid" + t.string "datasource_dbid" t.integer "pendingtype_id" t.text "alt_email" t.string "pub_first_name" @@ -490,13 +447,8 @@ t.string "pub_suffix" t.string "company" t.string "job_title" - end - - create_table "pending_publication_items", :force => true do |t| - t.integer "programme_item_id" - t.datetime "created_at" - t.datetime "updated_at" - t.integer "lock_version", :default => 0 + t.string "prefix", :default => "" + t.string "pub_prefix", :default => "" end create_table "people", :force => true do |t| @@ -504,8 +456,8 @@ t.string "last_name", :default => "" t.string "suffix", :default => "" t.string "language", :default => "" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "lock_version", :default => 0 t.integer "invitestatus_id" t.integer "invitation_category_id" @@ -514,16 +466,28 @@ t.text "comments" t.string "company", :default => "" t.string "job_title", :default => "" + t.string "prefix", :default => "" end create_table "peoplesources", :force => true do |t| t.integer "person_id" t.integer "datasource_id" - t.integer "datasource_dbid" - t.datetime "created_at" - t.datetime "updated_at" + t.string "datasource_dbid" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false end + create_table "person_con_states", :force => true do |t| + t.integer "person_id" + t.integer "acceptance_status_id" + t.integer "invitestatus_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "lock_version", :default => 0 + end + + add_index "person_con_states", ["person_id"], :name => "index_person_con_states_on_person_id" + create_table "person_constraints", :force => true do |t| t.integer "max_items_per_day" t.integer "max_items_per_con" @@ -536,8 +500,8 @@ create_table "person_mailing_assignments", :force => true do |t| t.integer "person_id" t.integer "mailing_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "lock_version", :default => 0 end @@ -547,34 +511,11 @@ create_table "phone_numbers", :force => true do |t| t.string "number", :default => "" t.integer "phone_type_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "lock_version", :default => 0 end - create_table "planner_help_page_help_translations", :force => true do |t| - t.integer "planner_help_page_help_id" - t.string "locale", :null => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "title" - t.text "text" - end - - add_index "planner_help_page_help_translations", ["locale"], :name => "index_b0af02e88965fb2be5f4bb7b374ef3de3da989c2" - add_index "planner_help_page_help_translations", ["planner_help_page_help_id"], :name => "index_d57b177f2a924a0dbd7aa20f8bc7215ec8f7a510" - - create_table "planner_help_page_helps", :force => true do |t| - t.string "title" - t.text "text" - t.string "page" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "lock_version", :default => 0 - end - - add_index "planner_help_page_helps", ["page"], :name => "index_planner_help_page_helps_on_page" - create_table "planner_konopas_konopas_configs", :force => true do |t| t.string "base_url" t.string "manifest_url" @@ -588,16 +529,6 @@ t.integer "lock_version", :default => 0 end - create_table "planner_mobile_mobile_content_images", :force => true do |t| - t.string "gallery" - t.string "picture" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "lock_version", :default => 0 - end - - add_index "planner_mobile_mobile_content_images", ["gallery"], :name => "index_planner_mobile_mobile_content_images_on_gallery" - create_table "postal_addresses", :force => true do |t| t.string "line1" t.string "line2" @@ -608,22 +539,17 @@ t.string "country" t.string "phone" t.boolean "isdefault" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "lock_version", :default => 0 - end - - create_table "preferences", :force => true do |t| - t.integer "user_id" - t.boolean "receive_messages" - t.datetime "created_at" - t.datetime "updated_at" + t.float "latitude" + t.float "longitude" end create_table "programme_item_assignments", :force => true do |t| t.integer "person_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "lock_version", :default => 0 t.integer "role_id" t.integer "programme_item_id" @@ -640,10 +566,10 @@ t.integer "duration" t.integer "minimum_people" t.integer "maximum_people" - t.text "notes" + t.text "item_notes" t.boolean "print" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "lock_version", :default => 0 t.integer "format_id" t.integer "setup_type_id" @@ -652,6 +578,7 @@ t.integer "audience_size" t.text "participant_notes" t.text "short_precis" + t.integer "parent_id" end create_table "pseudonyms", :force => true do |t| @@ -659,17 +586,18 @@ t.string "last_name", :default => "" t.string "suffix", :default => "" t.integer "person_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "lock_version", :default => 0 + t.string "prefix", :default => "" end add_index "pseudonyms", ["person_id"], :name => "pseudonym_person_index" create_table "publication_dates", :force => true do |t| t.datetime "timestamp" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "newitems", :default => 0 t.integer "modifieditems", :default => 0 t.integer "removeditems", :default => 0 @@ -690,8 +618,8 @@ t.string "original_type" t.integer "user_id" t.datetime "publication_date" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "lock_version", :default => 0 end @@ -700,8 +628,8 @@ create_table "published_programme_item_assignments", :force => true do |t| t.integer "published_programme_item_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "lock_version", :default => 0 t.integer "role_id" t.integer "person_id" @@ -716,14 +644,15 @@ t.string "title" t.text "precis" t.integer "duration" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "lock_version", :default => 0 t.integer "format_id" t.integer "pub_reference_number" t.integer "mobile_card_size", :default => 1 t.integer "audience_size" t.text "participant_notes" + t.integer "parent_id" end create_table "published_room_item_assignments", :force => true do |t| @@ -731,8 +660,8 @@ t.integer "published_programme_item_id" t.integer "published_time_slot_id" t.integer "day", :default => -1 - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "lock_version", :default => 0 end @@ -743,24 +672,26 @@ create_table "published_rooms", :force => true do |t| t.integer "published_venue_id" t.text "name" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "lock_version", :default => 0 + t.integer "sort_order", :default => 0 end create_table "published_time_slots", :force => true do |t| t.datetime "start" t.datetime "end" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "lock_version", :default => 0 end create_table "published_venues", :force => true do |t| t.text "name" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "lock_version", :default => 0 + t.integer "sort_order", :default => 0 end create_table "registration_details", :force => true do |t| @@ -769,9 +700,10 @@ t.string "registration_type" t.boolean "registered" t.boolean "ghost" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "lock_version", :default => 0 + t.boolean "can_share", :default => false end create_table "relationships", :force => true do |t| @@ -779,16 +711,16 @@ t.string "relatable_type" t.integer "person_id" t.string "relationship_type" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "lock_version", :default => 0 end create_table "role_assignments", :force => true do |t| t.integer "user_id" t.integer "role_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "lock_version", :default => 0 end @@ -800,8 +732,8 @@ t.integer "room_id" t.integer "programme_item_id" t.integer "time_slot_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "lock_version", :default => 0 t.integer "day", :default => -1 end @@ -815,16 +747,18 @@ t.integer "room_id" t.integer "setup_type_id" t.integer "capacity" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "lock_version", :default => 0 end create_table "rooms", :force => true do |t| t.integer "venue_id" t.text "name" - t.datetime "created_at" - t.datetime "updated_at" + t.integer "sort_order", :default => 0 + t.integer "integer", :default => 0 + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "lock_version", :default => 0 t.string "purpose" t.string "comment" @@ -844,28 +778,31 @@ create_table "setup_types", :force => true do |t| t.string "name" t.string "description" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "lock_version", :default => 0 end create_table "site_configs", :force => true do |t| - t.string "captcha_pub_key", :default => "" - t.string "captcha_priv_key", :default => "" - t.datetime "created_at" - t.datetime "updated_at" - t.integer "lock_version", :default => 0 - t.string "name", :default => "" - t.string "time_zone", :default => "Eastern Time (US & Canada)" + t.string "captcha_pub_key", :default => "" + t.string "captcha_priv_key", :default => "" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "lock_version", :default => 0 + t.string "name", :default => "" + t.string "time_zone", :default => "Eastern Time (US & Canada)" t.datetime "start_date" - t.integer "number_of_days", :default => 1 + t.integer "number_of_days", :default => 1 + t.string "print_time_format", :default => "24" + t.datetime "public_start_date" + t.integer "public_number_of_days", :default => 1 end create_table "survey_answers", :force => true do |t| t.text "answer" t.boolean "default", :default => false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "lock_version", :default => 0 t.integer "survey_question_id" t.integer "sort_order" @@ -877,36 +814,21 @@ end create_table "survey_assignments", :force => true do |t| - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "lock_version", :default => 0 t.integer "person_id" t.integer "survey_response_id" end - create_table "survey_copy_statuses", :force => true do |t| - t.integer "person_id" - t.integer "survey_respondent_id" - t.boolean "nameCopied", :default => false - t.boolean "pseudonymCopied", :default => false - t.boolean "addressCopied", :default => false - t.boolean "phoneCopied", :default => false - t.boolean "emailCopied", :default => false - t.datetime "created_at" - t.datetime "updated_at" - t.integer "lock_version", :default => 0 - t.boolean "tagsCopied", :default => false - t.boolean "availableDatesCopied", :default => false - end - create_table "survey_formats", :force => true do |t| t.text "help" t.string "style", :default => "" t.string "description_style", :default => "" t.string "answer_style", :default => "" t.string "question_style", :default => "" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "lock_version", :default => 0 t.integer "formatable_id" t.string "formatable_type" @@ -923,8 +845,8 @@ t.string "name", :default => "" t.string "altname", :default => "" t.text "description" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "lock_version", :default => 0 t.integer "survey_id" t.integer "sort_order" @@ -946,8 +868,8 @@ t.integer "survey_id" t.boolean "shared" t.integer "user_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "lock_version", :default => 0 t.boolean "date_order", :default => false t.boolean "show_country", :default => false @@ -956,10 +878,10 @@ create_table "survey_query_predicates", :force => true do |t| t.integer "survey_question_id" t.string "operation" - t.string "value" + t.text "value" t.integer "survey_query_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "lock_version", :default => 0 end @@ -971,8 +893,8 @@ t.string "question_type", :default => "textfield" t.integer "additional", :default => 0 t.string "validation", :default => "" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "lock_version", :default => 0 t.integer "survey_group_id" t.boolean "mandatory", :default => false @@ -993,8 +915,8 @@ t.text "question6" t.boolean "isbio" t.integer "questionmapping_id" - t.boolean "private", :default => false t.boolean "horizontal", :default => false + t.boolean "private", :default => false end create_table "survey_respondent_details", :force => true do |t| @@ -1003,30 +925,31 @@ t.string "suffix", :default => "" t.string "email", :default => "" t.integer "survey_respondent_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "lock_version", :default => 0 + t.string "prefix", :default => "" end add_index "survey_respondent_details", ["survey_respondent_id"], :name => "survey_resp_idx" create_table "survey_respondents", :force => true do |t| t.string "key" - t.datetime "created_at" - t.datetime "updated_at" + t.string "single_access_token" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.boolean "attending", :default => true t.integer "person_id" t.boolean "submitted_survey", :default => false t.integer "email_status_id" - t.string "single_access_token" end add_index "survey_respondents", ["person_id"], :name => "survey_resp_person_idx" create_table "survey_responses", :force => true do |t| t.text "response" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "lock_version", :default => 0 t.integer "survey_id" t.integer "survey_question_id" @@ -1038,6 +961,8 @@ t.text "response5" t.text "response6" t.boolean "isbio" + t.string "photo" + t.integer "survey_answer_id" end add_index "survey_responses", ["survey_id"], :name => "survey_idx" @@ -1046,16 +971,16 @@ create_table "survey_sub_questions", :force => true do |t| t.boolean "first", :default => false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "lock_version", :default => 0 t.integer "survey_question_id" t.integer "survey_answer_id" end create_table "surveys", :force => true do |t| - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "lock_version", :default => 0 t.string "name" t.text "welcome" @@ -1070,15 +995,17 @@ t.integer "decline_status_id" t.text "declined_msg" t.text "authenticate_msg" + t.boolean "anonymous", :default => false end add_index "surveys", ["alias"], :name => "survey_alias_idx" create_table "tag_contexts", :force => true do |t| t.string "name" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "lock_version", :default => 0 + t.boolean "publish", :default => true end create_table "taggings", :force => true do |t| @@ -1105,8 +1032,8 @@ t.datetime "start" t.datetime "end" t.string "type" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "lock_version", :default => 0 end @@ -1142,8 +1069,8 @@ t.datetime "last_sign_in_at" t.string "current_sign_in_ip" t.string "last_sign_in_ip" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "person_id" t.string "confirmation_token" t.datetime "confirmed_at" @@ -1165,9 +1092,10 @@ create_table "venues", :force => true do |t| t.string "name" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.integer "lock_version", :default => 0 + t.integer "sort_order", :default => 0 end end diff --git a/db/seeds.rb b/db/seeds.rb index 8a490b2..800356d 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -18,7 +18,6 @@ ], :without_protection => true ) end - if RoleAssignment.count == 0 RoleAssignment.create([ { :user_id => 1, :role_id => 2, :created_at => nil, :updated_at => nil, :lock_version => 0 },