Skip to content

Commit 3cde484

Browse files
Trace down the guideline for setting default value
We had [some discussion][] about this guideline in Slack, so let's document how it got there for next time. [some discussion]: https://thoughtbot.slack.com/archives/C02C73BAV/p1709221216376899 While here, emphasize that this guideline pertains to non-required strings specifically. Co-authored-by: Steve Polito <[email protected]>
1 parent 8470100 commit 3cde484

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: rails/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@
6565

6666
[Sample](migration.rb)
6767

68-
- Set an empty string as the default constraint for non-required string and text
69-
fields. [Example](migration.rb#L6).
68+
- Set an empty string as the default constraint for **non-required** string and text
69+
fields. [Example](migration.rb#L6). [#159](https://github.com/thoughtbot/guides/pull/159)
7070
- Set an explicit [`on_delete` behavior for foreign keys].
7171
- Don't change a migration after it has been merged into `main` if the desired
7272
change can be solved with another migration.

0 commit comments

Comments
 (0)