Skip to content

Instantly share code, notes, and snippets.

@pvin
Last active October 28, 2020 06:28
Show Gist options
  • Save pvin/381b0404904365f45a34e4de1dd9aad9 to your computer and use it in GitHub Desktop.
Save pvin/381b0404904365f45a34e4de1dd9aad9 to your computer and use it in GitHub Desktop.
Migration for string to array of integer type
change_column :Submitted_forms, :submittion_type, :integer, using: 'ARRAY[submittion_type]::INTEGER[]', array:true, default: []
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment