This is the Ruby on Rails application of peggedplacetowork.lk & techsalary.lk
Submit an issue here
Create your own data migration pull request
rails generate data_migration NameOfDataMigration
Look for the new data migration file in db/data_migrate/
folder.
Updated the generated file, for example
class NameOfDataMigration < ActiveRecord::Migration[7.0]
def change
Organization.create!(
name: "Company name",
pegged: true,
pegged_currency: 'USD',
remarks: 'Any remarks here',
pegging_value: PEGGING_VALUE::INT,
proportion: fully/partially
)
end
end
class NameOfDataMigration < ActiveRecord::Migration[7.0]
def change
Organization.find_by(name: 'Company name').update!(
name: "Company new name",
pegged: true,
pegged_currency: 'USD',
remarks: 'Any remarks here',
pegging_value: PEGGING_VALUE::INT,
proportion: fully/partially
)
end
end
Contributions are very welcome
prerequisites -
- Ruby 3.1.2
- Postgres
Run bundle install
to download the dependencies
rake db:create
rake db:migrate