Merge branch 'master' into redux-polling

This commit is contained in:
Juanjo Bazán
2016-12-27 18:22:06 +01:00
235 changed files with 3445 additions and 1099 deletions

View File

@@ -30,7 +30,6 @@ class DeviseCreateUsers < ActiveRecord::Migration
# t.string :unlock_token # Only if unlock strategy is :email or :both
# t.datetime :locked_at
t.timestamps null: false
end

View File

@@ -1,12 +1,12 @@
class CreateSimpleCaptchaData < ActiveRecord::Migration
def self.up
create_table :simple_captcha_data do |t|
t.string :key, :limit => 40
t.string :value, :limit => 6
t.string :key, limit: 40
t.string :value, limit: 6
t.timestamps
end
add_index :simple_captcha_data, :key, :name => "idx_key"
add_index :simple_captcha_data, :key, name: "idx_key"
end
def self.down

View File

@@ -1,12 +1,12 @@
class CreateInappropiateFlags < ActiveRecord::Migration
def change
create_table :inappropiate_flags do |t|
t.belongs_to :user, index: true, foreign_key: true
create_table :inappropiate_flags do |t|
t.belongs_to :user, index: true, foreign_key: true
t.string :flaggable_type
t.integer :flaggable_id
t.string :flaggable_type
t.integer :flaggable_id
t.timestamps
t.timestamps
end
add_index :inappropiate_flags, [:flaggable_type, :flaggable_id]

View File

@@ -6,7 +6,7 @@ class CreateTolkTables < ActiveRecord::Migration
t.datetime :updated_at
end
add_index :tolk_locales, :name, :unique => true
add_index :tolk_locales, :name, unique: true
create_table :tolk_phrases do |t|
t.text :key
@@ -19,17 +19,17 @@ class CreateTolkTables < ActiveRecord::Migration
t.integer :locale_id
t.text :text
t.text :previous_text
t.boolean :primary_updated, :default => false
t.boolean :primary_updated, default: false
t.datetime :created_at
t.datetime :updated_at
end
add_index :tolk_translations, [:phrase_id, :locale_id], :unique => true
add_index :tolk_translations, [:phrase_id, :locale_id], unique: true
end
def self.down
remove_index :tolk_translations, :column => [:phrase_id, :locale_id]
remove_index :tolk_locales, :column => :name
remove_index :tolk_translations, column: [:phrase_id, :locale_id]
remove_index :tolk_locales, column: :name
drop_table :tolk_translations
drop_table :tolk_phrases

View File

@@ -10,4 +10,4 @@ class AddTsvectorToDebates < ActiveRecord::Migration
remove_column :debates, :tsv
end
end
end

View File

@@ -5,4 +5,4 @@ class AddTsvectorToSpendingProposals < ActiveRecord::Migration
add_index :spending_proposals, :tsv, using: "gin"
end
end
end

View File

@@ -0,0 +1,11 @@
class CreateSignatureSheets < ActiveRecord::Migration
def change
create_table :signature_sheets do |t|
t.references :signable, polymorphic: true
t.text :document_numbers
t.boolean :processed, default: false
t.references :author
t.timestamps
end
end
end

View File

@@ -0,0 +1,11 @@
class CreateSignatures < ActiveRecord::Migration
def change
create_table :signatures do |t|
t.references :signature_sheet
t.references :user
t.string :document_number
t.boolean :verified, default: false
t.timestamps
end
end
end

View File

@@ -0,0 +1,5 @@
class AddSigntureIdToVotes < ActiveRecord::Migration
def change
add_reference :votes, :signature, index: true
end
end

View File

@@ -0,0 +1,5 @@
class AddCreatedFromSignatureToUsers < ActiveRecord::Migration
def change
add_column :users, :created_from_signature, :boolean, default: false
end
end