Merge Request #1

Merged
softwarepublico/spb_migrations!1
Created by Fabio Teixeira

R4 migrations

@arthurmde poderia revisar esse MR por favor

Assignee: Arthur Esposte
Milestone: None

Merged by Thiago Ribeiro

Commits (10)
3 participants
    A8ff67a0e69e7cfaeb1299e02082c339?s=40&d=identicon
    Arthur Esposte started a discussion on the outdated diff
    last updated by Arthur Esposte
    db/migrate/20150904174335_swap_softwares_blocks_between_areas_2_and_3.rb 0 → 100644
      1 +class SwapSoftwaresBlocksBetweenAreas2And3 < ActiveRecord::Migration
      2 + def up
      3 + swap_software_blocks_between_areas_2_and_3
      4 + end
      5 +
      6 + def down
      7 + swap_software_blocks_between_areas_2_and_3
    1
    • A8ff67a0e69e7cfaeb1299e02082c339?s=40&d=identicon
      Arthur Esposte @arthurmde

      Nesse tipo de migração que altera dados diretamente no banco não é possível reverter de fato a migração. Se tentar reverter pode fazer alterações indesejadas pois não há como diferenciar o que foi modificado pela migração e aquilo que foi adicionado pelo usuário. Portanto sempre use:

      say "This can't be reverted"

      Choose File ...   File name...
      Cancel
    A8ff67a0e69e7cfaeb1299e02082c339?s=40&d=identicon
    Arthur Esposte started a discussion on the outdated diff
    last updated by Arthur Esposte
    db/migrate/20150904181508_add_communities_ratings_block_to_all_softwares_communities.rb 0 → 100644
      1 +class AddCommunitiesRatingsBlockToAllSoftwaresCommunities < ActiveRecord::Migration
      2 + def up
      3 + Community.joins(:software_info).each do |software_community|
      4 + software_area_one = software_community.boxes.find_by_position 1
      5 + print "."
      6 +
      7 + ratings_block = CommunitiesRatingsBlock.new :mirror => true, :move_modes => "none", :edit_modes => "none"
    1
    • A8ff67a0e69e7cfaeb1299e02082c339?s=40&d=identicon
      Arthur Esposte @arthurmde

      Acho que esse bloco não pode ser um mirror . Isso deveria ser setado somente no template de software quando se adicionar esse bloco ao template. Depois, os blocos nos outros softwares deveria receber o id do bloco do template para se espelharem nele!

      Choose File ...   File name...
      Cancel
    A8ff67a0e69e7cfaeb1299e02082c339?s=40&d=identicon
    Arthur Esposte started a discussion on the outdated diff
    last updated by Arthur Esposte
    db/migrate/20150904202116_add_software_tab_data_block_to_all_softwares.rb 0 → 100644
      1 +class AddSoftwareTabDataBlockToAllSoftwares < ActiveRecord::Migration
      2 + def up
      3 + Community.joins(:software_info).each do |software_community|
      4 + software_area_one = software_community.boxes.find_by_position 1
      5 + print "."
      6 +
      7 + soft_tab_block = SoftwareTabDataBlock.new :mirror => true, :move_modes => "none", :edit_modes => "none"
    1
  • A8ff67a0e69e7cfaeb1299e02082c339?s=40&d=identicon
    Arthur Esposte @arthurmde

    Added 1 new commit:

    • 63bae030 - Fix migrations to consider software template
    Choose File ...   File name...
    Cancel
  • A8ff67a0e69e7cfaeb1299e02082c339?s=40&d=identicon
    Arthur Esposte @arthurmde

    @fabio1079 e @thiago fiz um novo commit corrigindo as coisas que comentei e outras pra tratar melhor os blocos espelhos. Podem dar uma revisada básica e reproduzir ai em um backup pra ver se está OK?

    Por minha parte está!

    Choose File ...   File name...
    Cancel
  • 8929f5e2c6b39a0a8afb4630b116faab?s=40&d=identicon
    Fabio Teixeira @fabio1079

    Added 1 new commit:

    • 548b315e - Add migration to add statictic block to all softwares
    Choose File ...   File name...
    Cancel
  • 8929f5e2c6b39a0a8afb4630b116faab?s=40&d=identicon
    Fabio Teixeira @fabio1079

    @arthurmde testamos aqui e está tudo ok. Também adicionamos o bloco de estatísticas na lateral direita.

    Choose File ...   File name...
    Cancel
  • 8929f5e2c6b39a0a8afb4630b116faab?s=40&d=identicon
    Fabio Teixeira @fabio1079

    Added 2 new commits:

    • d3f7fbfe - Rename communities_rating to organization_ratings
    • c070230f - Add wiki block to all softwares communities migration
    Choose File ...   File name...
    Cancel
  • 8929f5e2c6b39a0a8afb4630b116faab?s=40&d=identicon
    Fabio Teixeira @fabio1079

    Added 1 new commit:

    • 6dca73e1 - Replace ProfileImageBlock by CommunityBlock in all softwares communities
    Choose File ...   File name...
    Cancel
  • A8ff67a0e69e7cfaeb1299e02082c339?s=40&d=identicon
    Arthur Esposte @arthurmde

    Added 1 new commit:

    • 29bd4281 - Add migration to import Siorg Institutions
    Choose File ...   File name...
    Cancel
  • 8929f5e2c6b39a0a8afb4630b116faab?s=40&d=identicon
    Fabio Teixeira @fabio1079

    Added 1 new commit:

    • 3039a253 - Put all link list blocks to behind CommunityBlock
    Choose File ...   File name...
    Cancel
  • 800e3af93350753db9dee1864cef10ff?s=40&d=identicon
    Thiago Ribeiro @thiago
    Choose File ...   File name...
    Cancel