rails generate migration DropTablename
A file will be created, in the db > migrate folder, make sure it looks like:
| import PropTypes from 'prop-types' | |
| export default function Card({ title, mainText, color, colors, details }) { | |
| return ( | |
| <div> | |
| <h2 style={{ color }}>{title}</h2> | |
| <p>{mainText}</p> | |
| {colors.map((colorItem) => ( | |
| <span key={colorItem}>{colorItem}</span> | |
| ))} |
| # nil? can be used on any Ruby object. It returns true only if the object is nil. | |
| nil.nil? # => true | |
| [].nil? # => false | |
| {}.nil? # => false | |
| "".nil? # => false | |
| " ".nil? # => false | |
| true.nil? # => false | |
| # empty? can be used on some Ruby objects including Arrays, Hashes and Strings. It returns true only if the object's length is zero. | |
| nil.empty? # NoMethodError: undefined method `empty?' for nil:NilClass |
| //... | |
| // some interfaces imports skipped | |
| //... | |
| const createDirectUploadMutation = ` | |
| mutation createDirectUploadMutation( | |
| $filename: String! | |
| $byteSize: Int! | |
| $contentType: String! | |
| ) { |
| function generateColor() { | |
| return ( | |
| "#" + | |
| Math.random() | |
| .toString(16) | |
| .substr(-6) | |
| ) | |
| } |
| CraigMaslowski.erb | |
| dbaeumer.vscode-eslint | |
| esbenp.prettier-vscode | |
| ms-vscode-remote.remote-ssh | |
| ms-vscode-remote.remote-ssh-edit | |
| ms-vscode-remote.remote-wsl | |
| rebornix.ruby | |
| vscode-icons-team.vscode-icons | |
| wingrunr21.vscode-ruby | |
| CraigMaslowski.erb |
| { | |
| "cSpell.words": [ | |
| "dateutil", "refetch" | |
| ], | |
| "editor.formatOnPaste": true, | |
| // "editor.formatOnSave": true, | |
| "editor.formatOnType": true, | |
| "editor.fontFamily": "'Fira Code iScript', 'Fira Code', Consolas, 'Courier New', monospace", | |
| "editor.fontLigatures": true, | |
| "editor.tokenColorCustomizations": { |
| # frozen_string_literal: true | |
| module Mutations | |
| module Message | |
| # Updating message for the user | |
| class MessageUpdate < BaseMutation | |
| argument :id, ID, required: true | |
| field :message, Types::MessageType, null: true |
http://guides.rubyonrails.org/migrations.html
Picking the right architecture = Picking the right battles + Managing trade-offs