-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: remove bio and image fields from insert
Create user should only have email, password and username. See reference: https://demo.realworld.io/#/register https://realworld-docs.netlify.app/docs/specs/backend-specs/endpoints#registration
- Loading branch information
Showing
5 changed files
with
159 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE "users" ALTER COLUMN "bio" SET DEFAULT ''; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
{ | ||
"version": "5", | ||
"dialect": "pg", | ||
"id": "a00f4b17-7f1e-4d73-86c5-48cc1aaa92ec", | ||
"prevId": "d3648b42-2fea-42c2-a1d8-e55af14ec90a", | ||
"tables": { | ||
"user_follows": { | ||
"name": "user_follows", | ||
"schema": "", | ||
"columns": { | ||
"user_id": { | ||
"name": "user_id", | ||
"type": "integer", | ||
"primaryKey": false, | ||
"notNull": false | ||
}, | ||
"follower_id": { | ||
"name": "follower_id", | ||
"type": "integer", | ||
"primaryKey": false, | ||
"notNull": false | ||
}, | ||
"created_at": { | ||
"name": "created_at", | ||
"type": "date", | ||
"primaryKey": false, | ||
"notNull": false, | ||
"default": "CURRENT_DATE" | ||
}, | ||
"updated_at": { | ||
"name": "updated_at", | ||
"type": "date", | ||
"primaryKey": false, | ||
"notNull": false, | ||
"default": "CURRENT_DATE" | ||
} | ||
}, | ||
"indexes": {}, | ||
"foreignKeys": { | ||
"user_follows_user_id_users_id_fk": { | ||
"name": "user_follows_user_id_users_id_fk", | ||
"tableFrom": "user_follows", | ||
"tableTo": "users", | ||
"columnsFrom": ["user_id"], | ||
"columnsTo": ["id"], | ||
"onDelete": "no action", | ||
"onUpdate": "no action" | ||
}, | ||
"user_follows_follower_id_users_id_fk": { | ||
"name": "user_follows_follower_id_users_id_fk", | ||
"tableFrom": "user_follows", | ||
"tableTo": "users", | ||
"columnsFrom": ["follower_id"], | ||
"columnsTo": ["id"], | ||
"onDelete": "no action", | ||
"onUpdate": "no action" | ||
} | ||
}, | ||
"compositePrimaryKeys": { | ||
"user_follows_user_id_follower_id": { | ||
"name": "user_follows_user_id_follower_id", | ||
"columns": ["user_id", "follower_id"] | ||
} | ||
}, | ||
"uniqueConstraints": {} | ||
}, | ||
"users": { | ||
"name": "users", | ||
"schema": "", | ||
"columns": { | ||
"id": { | ||
"name": "id", | ||
"type": "serial", | ||
"primaryKey": true, | ||
"notNull": true | ||
}, | ||
"email": { | ||
"name": "email", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": true | ||
}, | ||
"bio": { | ||
"name": "bio", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": false, | ||
"default": "''" | ||
}, | ||
"image": { | ||
"name": "image", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": false, | ||
"default": "'https://api.realworld.io/images/smiley-cyrus.jpg'" | ||
}, | ||
"password": { | ||
"name": "password", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": true | ||
}, | ||
"username": { | ||
"name": "username", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": true | ||
}, | ||
"created_at": { | ||
"name": "created_at", | ||
"type": "date", | ||
"primaryKey": false, | ||
"notNull": false, | ||
"default": "CURRENT_DATE" | ||
}, | ||
"updated_at": { | ||
"name": "updated_at", | ||
"type": "date", | ||
"primaryKey": false, | ||
"notNull": false, | ||
"default": "CURRENT_DATE" | ||
} | ||
}, | ||
"indexes": {}, | ||
"foreignKeys": {}, | ||
"compositePrimaryKeys": {}, | ||
"uniqueConstraints": { | ||
"users_email_unique": { | ||
"name": "users_email_unique", | ||
"nullsNotDistinct": false, | ||
"columns": ["email"] | ||
} | ||
} | ||
} | ||
}, | ||
"enums": {}, | ||
"schemas": {}, | ||
"_meta": { | ||
"schemas": {}, | ||
"tables": {}, | ||
"columns": {} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters