Charledeon
Charledeon
Explore posts from servers
DTDrizzle Team
Created by Charledeon on 8/4/2024 in #help
Constrain Numeric or Integer inputs
I've reached the point where I'm creating a Database Schema using Drizzle ORM with a Postgres SQL Database on a NodeJS backend. I read the Drizzle Documentation, but I still don't get the full details of really setting up connection to my Database. Then I watched all the possible Drizzle Videos on Youtube. Unfortunately, only the video from Kyle ( https://youtu.be/7-NZ0MlPpJA ) -- got me started on Drizzle because it is the only video that was intended to teach the beginner, and did not assume that we already know something somewhere. THE PROBLEM 1.) Phone or Mobile numbers are 11 Digits. How do I constrain the Phone Field in my Postgres Schema to receive only 11 Digits either of the Numeric or Integer Data Type in Postgres? 2.) Which Data Type do I use to store Images, for my users? 3.) If I am asking for Social links-- where my users are expected to enter more than one Social link, is it Json Data Type or Array data Type, or which Data type should I use for this? Regards.
3 replies