-
Notifications
You must be signed in to change notification settings - Fork 228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc/md: updated gorm guide #1795
Conversation
doc/md/guides/orms/gorm.md
Outdated
"ariga.io/atlas-provider-gorm/gormschema" | ||
_ "ariga.io/atlas-provider-gorm/recordriver" | ||
"github.com/<yourorg>/<yourrepo>/path/to/models" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tabs instead?
doc/md/guides/orms/gorm.md
Outdated
20221002070731.sql h1:je1k1wqknzZ72N2Hmg0MRyuXwHVtg9k7dtoCf33G4Ek= | ||
``` | ||
type User struct { | ||
gorm.Model |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
doc/md/guides/orms/gorm.md
Outdated
CREATE TABLE `users` ( | ||
`id` bigint unsigned NOT NULL AUTO_INCREMENT, | ||
`created_at` datetime(3) NULL, | ||
`updated_at` datetime(3) NULL, | ||
`deleted_at` datetime(3) NULL, | ||
`name` longtext NULL, | ||
PRIMARY KEY (`id`), | ||
INDEX `idx_users_deleted_at` (`deleted_at`) | ||
) CHARSET utf8mb4 COLLATE utf8mb4_0900_ai_ci; | ||
-- Create "pets" table | ||
CREATE TABLE `pets` ( | ||
`id` bigint unsigned NOT NULL AUTO_INCREMENT, | ||
`created_at` datetime(3) NULL, | ||
`updated_at` datetime(3) NULL, | ||
`deleted_at` datetime(3) NULL, | ||
`name` longtext NULL, | ||
`user_id` bigint unsigned NULL, | ||
PRIMARY KEY (`id`), | ||
INDEX `fk_users_pets` (`user_id`), | ||
INDEX `idx_pets_deleted_at` (`deleted_at`), | ||
CONSTRAINT `fk_users_pets` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON UPDATE NO ACTION ON DELETE NO ACTION | ||
) CHARSET utf8mb4 COLLATE utf8mb4_0900_ai_ci; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This indentation is weird. Use two spaces instead?
No description provided.