I have a column version_num, in one of my tables, I noticed that by default the value does not fill up to 1.
Given that I already have a field in production, how can you add a wrapper that just adds a default value to the field?
thank
use the method change_column:
change_column
change_column :some_table, :column, :type, :default => 'foo'
See also: http://api.rubyonrails.org/classes/ActiveRecord/Migration.html
Source: https://habr.com/ru/post/1784224/More articles:Syntax for inserting and updating using SqlCe and EntityFramework - sqlEntityDataSource replace * with% wildcard on queries - asp.netInitializing a text field value on a jsp page with a java variable - javaMagento - determine which xml layout file the page is using? - xmlInitializing shared sections of an array immediately - arraysWindows in-process document database hosting - asp.netHow to fix datagrid groupheader from scrolling - stylesYoutube Javascript API play (); doesn't work .. what am I doing wrong? - javascriptInternet Explorer obj icon - htmlDifferent literal JavaScript object behavior in FireFox and Google Chrome? - javascriptAll Articles