mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-16 11:21:42 +00:00
migraciones faltantes
This commit is contained in:
parent
30861d240e
commit
22742cf058
2 changed files with 17 additions and 0 deletions
8
db/migrate/20211022224008_add_site_to_stats.rb
Normal file
8
db/migrate/20211022224008_add_site_to_stats.rb
Normal file
|
@ -0,0 +1,8 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# La recolección de estadísticas podría pertenecer a un sitio
|
||||
class AddSiteToStats < ActiveRecord::Migration[6.1]
|
||||
def change
|
||||
add_belongs_to :stats, :site, index: true, null: true
|
||||
end
|
||||
end
|
9
db/migrate/20211022225449_add_name_to_stats.rb
Normal file
9
db/migrate/20211022225449_add_name_to_stats.rb
Normal file
|
@ -0,0 +1,9 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Agregarle un nombre a la estadística
|
||||
class AddNameToStats < ActiveRecord::Migration[6.1]
|
||||
def change
|
||||
add_column :stats, :name, :string, null: false
|
||||
add_index :stats, :name, using: 'hash'
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue