You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
educoder/db/migrate/20191011025619_init_edu_cod...

23 lines
1.2 KiB

class InitEduCoderLaboratory < ActiveRecord::Migration[5.2]
def change
ActiveRecord::Base.transaction do
laboratory = Laboratory.create!(id: 1, identifier: 'www')
setting = laboratory.build_laboratory_setting
footer = %Q{
<p class="footer_con-p inline lineh-30 font-14">
<span class="font-18 fl">©</span>&nbsp;2019&nbsp;EduCoder
<a target="_blank" href="http://beian.miit.gov.cn/" class="ml15 mr15" style="color: rgb(136, 136, 136);">湘ICP备17009477号</a>
<a target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=43019002000962" class="mr15" style="color: rgb(136, 136, 136);">
<img class="vertical4" src="https://ali-cdn.educoder.net/react/build/static/media/beian.d0289dc0.png">湘公网安备43019002000962号
</a>
<a href="https://team.trustie.net" target="_blank" style="color: rgb(136, 136, 136);">Trustie</a>
&nbsp;&nbsp;&nbsp;&amp;&nbsp;&nbsp;&nbsp;IntelliDE inside.
<span class="mr15">版权所有 湖南智擎科技有限公司</span></p>
}
config = setting.class.default_config.merge(name: 'EduCoder', footer: footer)
setting.config = config
setting.save!
end
end
end