FelixNg
FelixNg
Explore posts from servers
RRailway
Created by FelixNg on 3/16/2024 in #✋|help
NextJS app not connecting to OTel collector
No description
50 replies
RRailway
Created by FelixNg on 3/15/2024 in #✋|help
Client-side error when nesting service groups
No description
12 replies
RRailway
Created by FelixNg on 3/13/2024 in #✋|help
Cloudflare proxy detected when setting up custom domain
No description
13 replies
RRailway
Created by FelixNg on 3/8/2024 in #✋|help
Stuck on issuing TLS certificate when creating custom domain
I have already tried removing my DNS settings and custom domain entry and re-add it. My domain provider is Namecheap.
40 replies
RRailway
Created by FelixNg on 1/31/2024 in #✋|help
Service not recognizing MinIO deployment on internal networking
No description
8 replies
DTDrizzle Team
Created by FelixNg on 1/30/2024 in #help
Foreign keys default to NOT NULL with PostgreSQL
I currently have these two tables. I don't understand why Drizzle keeps generating foreign keys with the NOT NULL constraints. I'd really appreciate any help regarding this, been bashing my head against the keyboard for so many hours now. Thanks a lot.
export const assetTable = pgTable(
'asset',
{
id: serial('id').primaryKey(),
},
);

export const trackTable = pgTable(
'track',
{
id: serial('id').primaryKey(),
// TODO: investigate why foreign keys default to NOT NULL
originalAssetId: serial('original_asset_id').references(
() => assetTable.id,
{
onDelete: 'cascade',
},
),
},
);
export const assetTable = pgTable(
'asset',
{
id: serial('id').primaryKey(),
},
);

export const trackTable = pgTable(
'track',
{
id: serial('id').primaryKey(),
// TODO: investigate why foreign keys default to NOT NULL
originalAssetId: serial('original_asset_id').references(
() => assetTable.id,
{
onDelete: 'cascade',
},
),
},
);
Below is the generated migration file
CREATE TABLE IF NOT EXISTS "asset" (
"id" serial PRIMARY KEY NOT NULL,
);

CREATE TABLE IF NOT EXISTS "track" (
"id" serial PRIMARY KEY NOT NULL,
"original_asset_id" serial NOT NULL,
);
CREATE TABLE IF NOT EXISTS "asset" (
"id" serial PRIMARY KEY NOT NULL,
);

CREATE TABLE IF NOT EXISTS "track" (
"id" serial PRIMARY KEY NOT NULL,
"original_asset_id" serial NOT NULL,
);
5 replies
DTDrizzle Team
Created by FelixNg on 11/24/2023 in #help
createInsertSchema & createSelectSchema difference
I am using drizzle-zod along with sveltekit-superforms and thoroughly enjoying the combo so far. One question I have is that what is the fundamental difference between the two functions above. I didn't find any related questions or documentation. I think they are mostly the same. taking in a drizzle schema and returning a zod object. Is it just a difference in semantics? I'll appreciate any input on this.
4 replies
RRailway
Created by FelixNg on 11/20/2023 in #✋|help
Best way to combine Railway, Cloudflare, and Namecheap
Hi, I will say that we are loving Railway and what your team is doing right now. My team is currently building a social platform and we are currently having our dev and prod environments deployed on Railway. We have also purchased a domain name from Namecheap. As we found out Cloudflare has a wide variety of features to add to our domain (the most essential right now is Email Routing), I wonder what would be the best method to integrate these three services? Would I have custom domain on my Railway frontend service (which is currently what we're doing right now) and use Cloudflare as a proxy between the clients and Railway servers? Or do I don't even need Cloudflare anyway? I'll reallly appreciate any input or answers.
6 replies