Hacker News new | ask | show | jobs
by localhostdotdev 2593 days ago
I stayed close to what the author did.

adding an index:

    add_index :tags, :name
adding a null constraint:

    change_column :tags, :name, :string, null: false
    validates :name, presence: true # for proper validations
https://github.com/localhostdotdev/bug/commit/3765237008c36c...
1 comments

> I stayed close to what the author did.

Fair enough. I’ll concede that wasn’t a fair comparison to the OP. My point remains that examples focusing on the initial setup are uninteresting (to me) because that’s not where the bulk of the work is.