|
@@ -34,13 +34,13 @@ class CreateBase < ActiveRecord::Migration
|
|
t.boolean :verified, null: false, default: false
|
|
t.boolean :verified, null: false, default: false
|
|
t.boolean :active, null: false, default: true
|
|
t.boolean :active, null: false, default: true
|
|
t.string :note, limit: 250, null: true, default: ''
|
|
t.string :note, limit: 250, null: true, default: ''
|
|
- t.timestamp :last_login, null: true
|
|
|
|
|
|
+ t.timestamp :last_login, limit: 3, null: true
|
|
t.string :source, limit: 200, null: true
|
|
t.string :source, limit: 200, null: true
|
|
t.integer :login_failed, null: false, default: 0
|
|
t.integer :login_failed, null: false, default: 0
|
|
t.string :preferences, limit: 8000, null: true
|
|
t.string :preferences, limit: 8000, null: true
|
|
t.integer :updated_by_id, null: false
|
|
t.integer :updated_by_id, null: false
|
|
t.integer :created_by_id, null: false
|
|
t.integer :created_by_id, null: false
|
|
- t.timestamps null: false
|
|
|
|
|
|
+ t.timestamps limit: 3, null: false
|
|
end
|
|
end
|
|
add_index :users, [:login], unique: true
|
|
add_index :users, [:login], unique: true
|
|
add_index :users, [:email]
|
|
add_index :users, [:email]
|
|
@@ -61,7 +61,7 @@ class CreateBase < ActiveRecord::Migration
|
|
t.string :note, limit: 250, null: true
|
|
t.string :note, limit: 250, null: true
|
|
t.integer :updated_by_id, null: false
|
|
t.integer :updated_by_id, null: false
|
|
t.integer :created_by_id, null: false
|
|
t.integer :created_by_id, null: false
|
|
- t.timestamps null: false
|
|
|
|
|
|
+ t.timestamps limit: 3, null: false
|
|
end
|
|
end
|
|
add_index :signatures, [:name], unique: true
|
|
add_index :signatures, [:name], unique: true
|
|
|
|
|
|
@@ -74,7 +74,7 @@ class CreateBase < ActiveRecord::Migration
|
|
t.string :preferences, limit: 2000, null: true
|
|
t.string :preferences, limit: 2000, null: true
|
|
t.integer :updated_by_id, null: false
|
|
t.integer :updated_by_id, null: false
|
|
t.integer :created_by_id, null: false
|
|
t.integer :created_by_id, null: false
|
|
- t.timestamps null: false
|
|
|
|
|
|
+ t.timestamps limit: 3, null: false
|
|
end
|
|
end
|
|
add_index :email_addresses, [:email], unique: true
|
|
add_index :email_addresses, [:email], unique: true
|
|
|
|
|
|
@@ -89,7 +89,7 @@ class CreateBase < ActiveRecord::Migration
|
|
t.string :note, limit: 250, null: true
|
|
t.string :note, limit: 250, null: true
|
|
t.integer :updated_by_id, null: false
|
|
t.integer :updated_by_id, null: false
|
|
t.integer :created_by_id, null: false
|
|
t.integer :created_by_id, null: false
|
|
- t.timestamps null: false
|
|
|
|
|
|
+ t.timestamps limit: 3, null: false
|
|
end
|
|
end
|
|
add_index :groups, [:name], unique: true
|
|
add_index :groups, [:name], unique: true
|
|
|
|
|
|
@@ -101,15 +101,15 @@ class CreateBase < ActiveRecord::Migration
|
|
t.string :note, limit: 250, null: true
|
|
t.string :note, limit: 250, null: true
|
|
t.integer :updated_by_id, null: false
|
|
t.integer :updated_by_id, null: false
|
|
t.integer :created_by_id, null: false
|
|
t.integer :created_by_id, null: false
|
|
- t.timestamps null: false
|
|
|
|
|
|
+ t.timestamps limit: 3, null: false
|
|
end
|
|
end
|
|
add_index :roles, [:name], unique: true
|
|
add_index :roles, [:name], unique: true
|
|
|
|
|
|
create_table :permissions do |t|
|
|
create_table :permissions do |t|
|
|
- t.string :name, limit: 255, null: false
|
|
|
|
- t.string :note, limit: 500, null: true
|
|
|
|
- t.string :preferences, limit: 10_000, null: true
|
|
|
|
- t.timestamps
|
|
|
|
|
|
+ t.string :name, limit: 255, null: false
|
|
|
|
+ t.string :note, limit: 500, null: true
|
|
|
|
+ t.string :preferences, limit: 10_000, null: true
|
|
|
|
+ t.timestamps limit: 3, null: false
|
|
end
|
|
end
|
|
add_index :permissions, [:name], unique: true
|
|
add_index :permissions, [:name], unique: true
|
|
|
|
|
|
@@ -125,7 +125,7 @@ class CreateBase < ActiveRecord::Migration
|
|
t.string :note, limit: 250, null: true, default: ''
|
|
t.string :note, limit: 250, null: true, default: ''
|
|
t.integer :updated_by_id, null: false
|
|
t.integer :updated_by_id, null: false
|
|
t.integer :created_by_id, null: false
|
|
t.integer :created_by_id, null: false
|
|
- t.timestamps null: false
|
|
|
|
|
|
+ t.timestamps limit: 3, null: false
|
|
end
|
|
end
|
|
add_index :organizations, [:name], unique: true
|
|
add_index :organizations, [:name], unique: true
|
|
|
|
|
|
@@ -157,7 +157,7 @@ class CreateBase < ActiveRecord::Migration
|
|
t.string :secret, limit: 250, null: true
|
|
t.string :secret, limit: 250, null: true
|
|
t.string :username, limit: 250, null: true
|
|
t.string :username, limit: 250, null: true
|
|
t.references :user, null: false
|
|
t.references :user, null: false
|
|
- t.timestamps null: false
|
|
|
|
|
|
+ t.timestamps limit: 3, null: false
|
|
end
|
|
end
|
|
add_index :authorizations, [:uid, :provider]
|
|
add_index :authorizations, [:uid, :provider]
|
|
add_index :authorizations, [:user_id]
|
|
add_index :authorizations, [:user_id]
|
|
@@ -168,7 +168,7 @@ class CreateBase < ActiveRecord::Migration
|
|
t.string :alias, limit: 20, null: true
|
|
t.string :alias, limit: 20, null: true
|
|
t.string :name, limit: 255, null: false
|
|
t.string :name, limit: 255, null: false
|
|
t.boolean :active, null: false, default: true
|
|
t.boolean :active, null: false, default: true
|
|
- t.timestamps null: false
|
|
|
|
|
|
+ t.timestamps limit: 3, null: false
|
|
end
|
|
end
|
|
add_index :locales, [:locale], unique: true
|
|
add_index :locales, [:locale], unique: true
|
|
add_index :locales, [:name], unique: true
|
|
add_index :locales, [:name], unique: true
|
|
@@ -181,20 +181,20 @@ class CreateBase < ActiveRecord::Migration
|
|
t.string :format, limit: 20, null: false, default: 'string'
|
|
t.string :format, limit: 20, null: false, default: 'string'
|
|
t.integer :updated_by_id, null: false
|
|
t.integer :updated_by_id, null: false
|
|
t.integer :created_by_id, null: false
|
|
t.integer :created_by_id, null: false
|
|
- t.timestamps null: false
|
|
|
|
|
|
+ t.timestamps limit: 3, null: false
|
|
end
|
|
end
|
|
add_index :translations, [:source], length: 255
|
|
add_index :translations, [:source], length: 255
|
|
add_index :translations, [:locale]
|
|
add_index :translations, [:locale]
|
|
|
|
|
|
create_table :object_lookups do |t|
|
|
create_table :object_lookups do |t|
|
|
t.string :name, limit: 250, null: false
|
|
t.string :name, limit: 250, null: false
|
|
- t.timestamps null: false
|
|
|
|
|
|
+ t.timestamps limit: 3, null: false
|
|
end
|
|
end
|
|
add_index :object_lookups, [:name], unique: true
|
|
add_index :object_lookups, [:name], unique: true
|
|
|
|
|
|
create_table :type_lookups do |t|
|
|
create_table :type_lookups do |t|
|
|
t.string :name, limit: 250, null: false
|
|
t.string :name, limit: 250, null: false
|
|
- t.timestamps null: false
|
|
|
|
|
|
+ t.timestamps limit: 3, null: false
|
|
end
|
|
end
|
|
add_index :type_lookups, [:name], unique: true
|
|
add_index :type_lookups, [:name], unique: true
|
|
|
|
|
|
@@ -205,9 +205,9 @@ class CreateBase < ActiveRecord::Migration
|
|
t.string :action, limit: 40, null: false
|
|
t.string :action, limit: 40, null: false
|
|
t.string :label, limit: 255, null: true
|
|
t.string :label, limit: 255, null: true
|
|
t.text :preferences, limit: 500.kilobytes + 1, null: true
|
|
t.text :preferences, limit: 500.kilobytes + 1, null: true
|
|
- t.timestamp :last_used_at, null: true
|
|
|
|
|
|
+ t.timestamp :last_used_at, limit: 3, null: true
|
|
t.date :expires_at, null: true
|
|
t.date :expires_at, null: true
|
|
- t.timestamps null: false
|
|
|
|
|
|
+ t.timestamps limit: 3, null: false
|
|
end
|
|
end
|
|
add_index :tokens, :user_id
|
|
add_index :tokens, :user_id
|
|
add_index :tokens, [:name, :action], unique: true
|
|
add_index :tokens, [:name, :action], unique: true
|
|
@@ -221,12 +221,12 @@ class CreateBase < ActiveRecord::Migration
|
|
t.string :state, limit: 50, null: false
|
|
t.string :state, limit: 50, null: false
|
|
t.integer :updated_by_id, null: false
|
|
t.integer :updated_by_id, null: false
|
|
t.integer :created_by_id, null: false
|
|
t.integer :created_by_id, null: false
|
|
- t.timestamps null: false
|
|
|
|
|
|
+ t.timestamps limit: 3, null: false
|
|
end
|
|
end
|
|
create_table :package_migrations do |t|
|
|
create_table :package_migrations do |t|
|
|
t.string :name, limit: 250, null: false
|
|
t.string :name, limit: 250, null: false
|
|
t.string :version, limit: 250, null: false
|
|
t.string :version, limit: 250, null: false
|
|
- t.timestamps null: false
|
|
|
|
|
|
+ t.timestamps limit: 3, null: false
|
|
end
|
|
end
|
|
|
|
|
|
create_table :taskbars do |t|
|
|
create_table :taskbars do |t|
|
|
@@ -235,12 +235,12 @@ class CreateBase < ActiveRecord::Migration
|
|
t.string :client_id, null: false
|
|
t.string :client_id, null: false
|
|
t.string :key, limit: 100, null: false
|
|
t.string :key, limit: 100, null: false
|
|
t.string :callback, limit: 100, null: false
|
|
t.string :callback, limit: 100, null: false
|
|
- t.column :state, :text, limit: 2.megabytes + 1, null: true
|
|
|
|
|
|
+ t.text :state, limit: 2.megabytes + 1, null: true
|
|
t.string :params, limit: 2000, null: true
|
|
t.string :params, limit: 2000, null: true
|
|
t.integer :prio, null: false
|
|
t.integer :prio, null: false
|
|
t.boolean :notify, null: false, default: false
|
|
t.boolean :notify, null: false, default: false
|
|
t.boolean :active, null: false, default: false
|
|
t.boolean :active, null: false, default: false
|
|
- t.timestamps null: false
|
|
|
|
|
|
+ t.timestamps limit: 3, null: false
|
|
end
|
|
end
|
|
add_index :taskbars, [:user_id]
|
|
add_index :taskbars, [:user_id]
|
|
add_index :taskbars, [:client_id]
|
|
add_index :taskbars, [:client_id]
|
|
@@ -250,21 +250,21 @@ class CreateBase < ActiveRecord::Migration
|
|
t.references :tag_object, null: false
|
|
t.references :tag_object, null: false
|
|
t.integer :o_id, null: false
|
|
t.integer :o_id, null: false
|
|
t.integer :created_by_id, null: false
|
|
t.integer :created_by_id, null: false
|
|
- t.timestamps null: false
|
|
|
|
|
|
+ t.timestamps limit: 3, null: false
|
|
end
|
|
end
|
|
add_index :tags, [:o_id]
|
|
add_index :tags, [:o_id]
|
|
add_index :tags, [:tag_object_id]
|
|
add_index :tags, [:tag_object_id]
|
|
|
|
|
|
create_table :tag_objects do |t|
|
|
create_table :tag_objects do |t|
|
|
t.string :name, limit: 250, null: false
|
|
t.string :name, limit: 250, null: false
|
|
- t.timestamps null: false
|
|
|
|
|
|
+ t.timestamps limit: 3, null: false
|
|
end
|
|
end
|
|
add_index :tag_objects, [:name], unique: true
|
|
add_index :tag_objects, [:name], unique: true
|
|
|
|
|
|
create_table :tag_items do |t|
|
|
create_table :tag_items do |t|
|
|
t.string :name, limit: 250, null: false
|
|
t.string :name, limit: 250, null: false
|
|
t.string :name_downcase, limit: 250, null: false
|
|
t.string :name_downcase, limit: 250, null: false
|
|
- t.timestamps null: false
|
|
|
|
|
|
+ t.timestamps limit: 3, null: false
|
|
end
|
|
end
|
|
add_index :tag_items, [:name_downcase]
|
|
add_index :tag_items, [:name_downcase]
|
|
|
|
|
|
@@ -272,7 +272,7 @@ class CreateBase < ActiveRecord::Migration
|
|
t.references :recent_view_object, null: false
|
|
t.references :recent_view_object, null: false
|
|
t.integer :o_id, null: false
|
|
t.integer :o_id, null: false
|
|
t.integer :created_by_id, null: false
|
|
t.integer :created_by_id, null: false
|
|
- t.timestamps null: false
|
|
|
|
|
|
+ t.timestamps limit: 3, null: false
|
|
end
|
|
end
|
|
add_index :recent_views, [:o_id]
|
|
add_index :recent_views, [:o_id]
|
|
add_index :recent_views, [:created_by_id]
|
|
add_index :recent_views, [:created_by_id]
|
|
@@ -286,7 +286,7 @@ class CreateBase < ActiveRecord::Migration
|
|
t.references :group, null: true
|
|
t.references :group, null: true
|
|
t.integer :o_id, null: false
|
|
t.integer :o_id, null: false
|
|
t.integer :created_by_id, null: false
|
|
t.integer :created_by_id, null: false
|
|
- t.timestamps null: false
|
|
|
|
|
|
+ t.timestamps limit: 3, null: false
|
|
end
|
|
end
|
|
add_index :activity_streams, [:o_id]
|
|
add_index :activity_streams, [:o_id]
|
|
add_index :activity_streams, [:created_by_id]
|
|
add_index :activity_streams, [:created_by_id]
|
|
@@ -308,7 +308,7 @@ class CreateBase < ActiveRecord::Migration
|
|
t.string :value_from, limit: 500, null: true
|
|
t.string :value_from, limit: 500, null: true
|
|
t.string :value_to, limit: 500, null: true
|
|
t.string :value_to, limit: 500, null: true
|
|
t.integer :created_by_id, null: false
|
|
t.integer :created_by_id, null: false
|
|
- t.timestamps null: false
|
|
|
|
|
|
+ t.timestamps limit: 3, null: false
|
|
end
|
|
end
|
|
add_index :histories, [:o_id]
|
|
add_index :histories, [:o_id]
|
|
add_index :histories, [:created_by_id]
|
|
add_index :histories, [:created_by_id]
|
|
@@ -323,20 +323,20 @@ class CreateBase < ActiveRecord::Migration
|
|
|
|
|
|
create_table :history_types do |t|
|
|
create_table :history_types do |t|
|
|
t.string :name, limit: 250, null: false
|
|
t.string :name, limit: 250, null: false
|
|
- t.timestamps null: false
|
|
|
|
|
|
+ t.timestamps limit: 3, null: false
|
|
end
|
|
end
|
|
add_index :history_types, [:name], unique: true
|
|
add_index :history_types, [:name], unique: true
|
|
|
|
|
|
create_table :history_objects do |t|
|
|
create_table :history_objects do |t|
|
|
t.string :name, limit: 250, null: false
|
|
t.string :name, limit: 250, null: false
|
|
t.string :note, limit: 250, null: true
|
|
t.string :note, limit: 250, null: true
|
|
- t.timestamps null: false
|
|
|
|
|
|
+ t.timestamps limit: 3, null: false
|
|
end
|
|
end
|
|
add_index :history_objects, [:name], unique: true
|
|
add_index :history_objects, [:name], unique: true
|
|
|
|
|
|
create_table :history_attributes do |t|
|
|
create_table :history_attributes do |t|
|
|
t.string :name, limit: 250, null: false
|
|
t.string :name, limit: 250, null: false
|
|
- t.timestamps null: false
|
|
|
|
|
|
+ t.timestamps limit: 3, null: false
|
|
end
|
|
end
|
|
add_index :history_attributes, [:name], unique: true
|
|
add_index :history_attributes, [:name], unique: true
|
|
|
|
|
|
@@ -350,7 +350,7 @@ class CreateBase < ActiveRecord::Migration
|
|
t.string :state_initial, limit: 2000, null: true
|
|
t.string :state_initial, limit: 2000, null: true
|
|
t.boolean :frontend, null: false
|
|
t.boolean :frontend, null: false
|
|
t.text :preferences, limit: 200.kilobytes + 1, null: true
|
|
t.text :preferences, limit: 200.kilobytes + 1, null: true
|
|
- t.timestamps null: false
|
|
|
|
|
|
+ t.timestamps limit: 3, null: false
|
|
end
|
|
end
|
|
add_index :settings, [:name], unique: true
|
|
add_index :settings, [:name], unique: true
|
|
add_index :settings, [:area]
|
|
add_index :settings, [:area]
|
|
@@ -364,21 +364,21 @@ class CreateBase < ActiveRecord::Migration
|
|
t.string :size, limit: 50, null: true
|
|
t.string :size, limit: 50, null: true
|
|
t.string :filename, limit: 250, null: false
|
|
t.string :filename, limit: 250, null: false
|
|
t.integer :created_by_id, null: false
|
|
t.integer :created_by_id, null: false
|
|
- t.timestamps null: false
|
|
|
|
|
|
+ t.timestamps limit: 3, null: false
|
|
end
|
|
end
|
|
add_index :stores, [:store_object_id, :o_id]
|
|
add_index :stores, [:store_object_id, :o_id]
|
|
|
|
|
|
create_table :store_objects do |t|
|
|
create_table :store_objects do |t|
|
|
t.string :name, limit: 250, null: false
|
|
t.string :name, limit: 250, null: false
|
|
t.string :note, limit: 250, null: true
|
|
t.string :note, limit: 250, null: true
|
|
- t.timestamps null: false
|
|
|
|
|
|
+ t.timestamps limit: 3, null: false
|
|
end
|
|
end
|
|
add_index :store_objects, [:name], unique: true
|
|
add_index :store_objects, [:name], unique: true
|
|
|
|
|
|
create_table :store_files do |t|
|
|
create_table :store_files do |t|
|
|
t.string :sha, limit: 128, null: false
|
|
t.string :sha, limit: 128, null: false
|
|
t.string :provider, limit: 20, null: true
|
|
t.string :provider, limit: 20, null: true
|
|
- t.timestamps null: false
|
|
|
|
|
|
+ t.timestamps limit: 3, null: false
|
|
end
|
|
end
|
|
add_index :store_files, [:sha], unique: true
|
|
add_index :store_files, [:sha], unique: true
|
|
add_index :store_files, [:provider]
|
|
add_index :store_files, [:provider]
|
|
@@ -386,7 +386,7 @@ class CreateBase < ActiveRecord::Migration
|
|
create_table :store_provider_dbs do |t|
|
|
create_table :store_provider_dbs do |t|
|
|
t.string :sha, limit: 128, null: false
|
|
t.string :sha, limit: 128, null: false
|
|
t.binary :data, limit: 200.megabytes, null: true
|
|
t.binary :data, limit: 200.megabytes, null: true
|
|
- t.timestamps null: false
|
|
|
|
|
|
+ t.timestamps limit: 3, null: false
|
|
end
|
|
end
|
|
add_index :store_provider_dbs, [:sha], unique: true
|
|
add_index :store_provider_dbs, [:sha], unique: true
|
|
|
|
|
|
@@ -403,7 +403,7 @@ class CreateBase < ActiveRecord::Migration
|
|
t.string :source_url, limit: 512, null: true
|
|
t.string :source_url, limit: 512, null: true
|
|
t.integer :updated_by_id, null: false
|
|
t.integer :updated_by_id, null: false
|
|
t.integer :created_by_id, null: false
|
|
t.integer :created_by_id, null: false
|
|
- t.timestamps null: false
|
|
|
|
|
|
+ t.timestamps limit: 3, null: false
|
|
end
|
|
end
|
|
add_index :avatars, [:o_id, :object_lookup_id]
|
|
add_index :avatars, [:o_id, :object_lookup_id]
|
|
add_index :avatars, [:store_hash]
|
|
add_index :avatars, [:store_hash]
|
|
@@ -418,7 +418,7 @@ class CreateBase < ActiveRecord::Migration
|
|
t.boolean :seen, null: false, default: false
|
|
t.boolean :seen, null: false, default: false
|
|
t.integer :updated_by_id, null: false
|
|
t.integer :updated_by_id, null: false
|
|
t.integer :created_by_id, null: false
|
|
t.integer :created_by_id, null: false
|
|
- t.timestamps null: false
|
|
|
|
|
|
+ t.timestamps limit: 3, null: false
|
|
end
|
|
end
|
|
add_index :online_notifications, [:user_id]
|
|
add_index :online_notifications, [:user_id]
|
|
add_index :online_notifications, [:seen]
|
|
add_index :online_notifications, [:seen]
|
|
@@ -426,33 +426,33 @@ class CreateBase < ActiveRecord::Migration
|
|
add_index :online_notifications, [:updated_at]
|
|
add_index :online_notifications, [:updated_at]
|
|
|
|
|
|
create_table :schedulers do |t|
|
|
create_table :schedulers do |t|
|
|
- t.column :name, :string, limit: 250, null: false
|
|
|
|
- t.column :method, :string, limit: 250, null: false
|
|
|
|
- t.column :period, :integer, null: true
|
|
|
|
- t.column :running, :integer, null: false, default: false
|
|
|
|
- t.column :last_run, :timestamp, null: true
|
|
|
|
- t.column :prio, :integer, null: false
|
|
|
|
- t.column :pid, :string, limit: 250, null: true
|
|
|
|
- t.column :note, :string, limit: 250, null: true
|
|
|
|
- t.column :active, :boolean, null: false, default: false
|
|
|
|
- t.column :updated_by_id, :integer, null: false
|
|
|
|
- t.column :created_by_id, :integer, null: false
|
|
|
|
- t.timestamps null: false
|
|
|
|
|
|
+ t.string :name, limit: 250, null: false
|
|
|
|
+ t.string :method, limit: 250, null: false
|
|
|
|
+ t.integer :period, null: true
|
|
|
|
+ t.integer :running, null: false, default: false
|
|
|
|
+ t.timestamp :last_run, limit: 3, null: true
|
|
|
|
+ t.integer :prio, null: false
|
|
|
|
+ t.string :pid, limit: 250, null: true
|
|
|
|
+ t.string :note, limit: 250, null: true
|
|
|
|
+ t.boolean :active, null: false, default: false
|
|
|
|
+ t.integer :updated_by_id, null: false
|
|
|
|
+ t.integer :created_by_id, null: false
|
|
|
|
+ t.timestamps limit: 3, null: false
|
|
end
|
|
end
|
|
add_index :schedulers, [:name], unique: true
|
|
add_index :schedulers, [:name], unique: true
|
|
|
|
|
|
create_table :calendars do |t|
|
|
create_table :calendars do |t|
|
|
- t.string :name, limit: 250, null: true
|
|
|
|
- t.string :timezone, limit: 250, null: true
|
|
|
|
|
|
+ t.string :name, limit: 250, null: true
|
|
|
|
+ t.string :timezone, limit: 250, null: true
|
|
t.string :business_hours, limit: 3000, null: true
|
|
t.string :business_hours, limit: 3000, null: true
|
|
- t.boolean :default, null: false, default: false
|
|
|
|
- t.string :ical_url, limit: 500, null: true
|
|
|
|
|
|
+ t.boolean :default, null: false, default: false
|
|
|
|
+ t.string :ical_url, limit: 500, null: true
|
|
t.text :public_holidays, limit: 500.kilobytes + 1, null: true
|
|
t.text :public_holidays, limit: 500.kilobytes + 1, null: true
|
|
t.text :last_log, limit: 500.kilobytes + 1, null: true
|
|
t.text :last_log, limit: 500.kilobytes + 1, null: true
|
|
- t.timestamp :last_sync, null: true
|
|
|
|
- t.integer :updated_by_id, null: false
|
|
|
|
- t.integer :created_by_id, null: false
|
|
|
|
- t.timestamps null: false
|
|
|
|
|
|
+ t.timestamp :last_sync, limit: 3, null: true
|
|
|
|
+ t.integer :updated_by_id, null: false
|
|
|
|
+ t.integer :created_by_id, null: false
|
|
|
|
+ t.timestamps limit: 3, null: false
|
|
end
|
|
end
|
|
add_index :calendars, [:name], unique: true
|
|
add_index :calendars, [:name], unique: true
|
|
|
|
|
|
@@ -467,7 +467,7 @@ class CreateBase < ActiveRecord::Migration
|
|
t.string :fingerprint, limit: 160, null: true
|
|
t.string :fingerprint, limit: 160, null: true
|
|
t.string :user_agent, limit: 250, null: true
|
|
t.string :user_agent, limit: 250, null: true
|
|
t.string :ip, limit: 160, null: true
|
|
t.string :ip, limit: 160, null: true
|
|
- t.timestamps null: false
|
|
|
|
|
|
+ t.timestamps limit: 3, null: false
|
|
end
|
|
end
|
|
add_index :user_devices, [:user_id]
|
|
add_index :user_devices, [:user_id]
|
|
add_index :user_devices, [:os, :browser, :location]
|
|
add_index :user_devices, [:os, :browser, :location]
|
|
@@ -478,27 +478,27 @@ class CreateBase < ActiveRecord::Migration
|
|
create_table :external_credentials do |t|
|
|
create_table :external_credentials do |t|
|
|
t.string :name
|
|
t.string :name
|
|
t.string :credentials, limit: 2500, null: false
|
|
t.string :credentials, limit: 2500, null: false
|
|
- t.timestamps null: false
|
|
|
|
|
|
+ t.timestamps limit: 3, null: false
|
|
end
|
|
end
|
|
|
|
|
|
create_table :object_manager_attributes do |t|
|
|
create_table :object_manager_attributes do |t|
|
|
- t.references :object_lookup, null: false
|
|
|
|
- t.column :name, :string, limit: 200, null: false
|
|
|
|
- t.column :display, :string, limit: 200, null: false
|
|
|
|
- t.column :data_type, :string, limit: 100, null: false
|
|
|
|
- t.column :data_option, :string, limit: 8000, null: true
|
|
|
|
- t.column :data_option_new, :string, limit: 8000, null: true
|
|
|
|
- t.column :editable, :boolean, null: false, default: true
|
|
|
|
- t.column :active, :boolean, null: false, default: true
|
|
|
|
- t.column :screens, :string, limit: 2000, null: true
|
|
|
|
- t.column :to_create, :boolean, null: false, default: false
|
|
|
|
- t.column :to_migrate, :boolean, null: false, default: false
|
|
|
|
- t.column :to_delete, :boolean, null: false, default: false
|
|
|
|
- t.column :to_config, :boolean, null: false, default: false
|
|
|
|
- t.column :position, :integer, null: false
|
|
|
|
- t.column :created_by_id, :integer, null: false
|
|
|
|
- t.column :updated_by_id, :integer, null: false
|
|
|
|
- t.timestamps null: false
|
|
|
|
|
|
+ t.references :object_lookup, null: false
|
|
|
|
+ t.string :name, limit: 200, null: false
|
|
|
|
+ t.string :display, limit: 200, null: false
|
|
|
|
+ t.string :data_type, limit: 100, null: false
|
|
|
|
+ t.string :data_option, limit: 8000, null: true
|
|
|
|
+ t.string :data_option_new, limit: 8000, null: true
|
|
|
|
+ t.boolean :editable, null: false, default: true
|
|
|
|
+ t.boolean :active, null: false, default: true
|
|
|
|
+ t.string :screens, limit: 2000, null: true
|
|
|
|
+ t.boolean :to_create, null: false, default: false
|
|
|
|
+ t.boolean :to_migrate, null: false, default: false
|
|
|
|
+ t.boolean :to_delete, null: false, default: false
|
|
|
|
+ t.boolean :to_config, null: false, default: false
|
|
|
|
+ t.integer :position, null: false
|
|
|
|
+ t.integer :created_by_id, null: false
|
|
|
|
+ t.integer :updated_by_id, null: false
|
|
|
|
+ t.timestamps limit: 3, null: false
|
|
end
|
|
end
|
|
add_index :object_manager_attributes, [:object_lookup_id, :name], unique: true
|
|
add_index :object_manager_attributes, [:object_lookup_id, :name], unique: true
|
|
add_index :object_manager_attributes, [:object_lookup_id]
|
|
add_index :object_manager_attributes, [:object_lookup_id]
|
|
@@ -513,7 +513,7 @@ class CreateBase < ActiveRecord::Migration
|
|
t.datetime :failed_at # Set when all retries have failed (actually, by default, the record is deleted instead)
|
|
t.datetime :failed_at # Set when all retries have failed (actually, by default, the record is deleted instead)
|
|
t.string :locked_by # Who is working on this object (if locked)
|
|
t.string :locked_by # Who is working on this object (if locked)
|
|
t.string :queue # The name of the queue this job is in
|
|
t.string :queue # The name of the queue this job is in
|
|
- t.timestamps null: false
|
|
|
|
|
|
+ t.timestamps limit: 3, null: false
|
|
end
|
|
end
|
|
|
|
|
|
add_index :delayed_jobs, [:priority, :run_at], name: 'delayed_jobs_priority'
|
|
add_index :delayed_jobs, [:priority, :run_at], name: 'delayed_jobs_priority'
|