Prisma のバージョンを最新にアップデート - #946
Open
chelproc wants to merge 25 commits into
Open
Conversation
Deploying utcode-learn with
|
| Latest commit: |
3d7fccb
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://cc6d6189.utcode-learn.pages.dev |
| Branch Preview URL: | https://update-prisma-to-latest-vers.utcode-learn.pages.dev |
chelproc
force-pushed
the
update-prisma-to-latest-version
branch
3 times, most recently
from
March 21, 2026 10:44
ab790cb to
a108f20
Compare
chelproc
marked this pull request as ready for review
March 21, 2026 11:12
chelproc
force-pushed
the
update-prisma-to-latest-version
branch
from
April 12, 2026 06:36
9e052db to
2e79eda
Compare
chvmvd
reviewed
May 2, 2026
chvmvd
left a comment
Contributor
There was a problem hiding this comment.
途中までレビューしたのですが、そもそも動作していないような気がします...
Contributor
|
「Cookieと認証(発展)」の節でもPrismaを使用しているので、こちらも合わせて修正したいですね 👀 |
Yokomi422
reviewed
May 9, 2026
chelproc
force-pushed
the
update-prisma-to-latest-version
branch
from
May 9, 2026 09:35
4e670e1 to
791fb0c
Compare
chelproc
force-pushed
the
update-prisma-to-latest-version
branch
from
May 9, 2026 09:36
791fb0c to
ae1cdad
Compare
Contributor
Author
|
#961 を cherry-pick |
chvmvd
reviewed
Jun 27, 2026
chvmvd
reviewed
Jun 27, 2026
Contributor
^ |
chelproc
force-pushed
the
update-prisma-to-latest-version
branch
from
July 19, 2026 04:58
652dabc to
57dbffc
Compare
This was referenced Jul 19, 2026
Contributor
Author
|
残置された課題は別 issue にしました。 |
chvmvd
reviewed
Jul 25, 2026
Contributor
There was a problem hiding this comment.
ここの動画が更新されていなさそうですね。
比較的影響は少ないとは思うので、また時間がある時でもよいかとは思いますが。
Comment on lines
135
to
148
| :::tip[環境変数] | ||
| データベースへの接続情報は、プログラム内に直接記述するのではなく、<Term>**環境変数**</Term>を用いて指定することが一般的です。環境変数は、アプリケーションの実行時に、アプリケーション自体を変更することなく外側から動作を変更するために用いることができる仕組みで、キーと値の組み合わせによって定義されます。環境変数は、主に次のような情報をプログラム内に記述することを避けるために用いられます。 | ||
|
|
||
| - 機密情報 | ||
| - 環境ごとに異なる設定情報 | ||
|
|
||
| アプリケーションの実行時に環境変数を指定するには、コマンドの前に`KEY=VALUE`の形式の文字列を記述します。例えば、ターミナル上で次のコマンドを実行すると、`main.js`では、[`process.env.DATABASE_URL`を通して](https://nodejs.org/ja/learn/command-line/how-to-read-environment-variables-from-nodejs)環境変数`DATABASE_URL`の値を取得できます。 | ||
|
|
||
| ```shell | ||
| DATABASE_URL=postgresql://user:password@example.com:5432/db node main.js | ||
| ``` | ||
|
|
||
| `.env`ファイルは、環境変数の指定を簡略化するために慣習的に用いられるファイルです。`node --env-file=.env main.js`のように指定することで、`.env`ファイルに記述された環境変数を読み込ませることができます。なお、Prismaは`.env`ファイルの内容を自動的に読み込むため、`--env-file`オプションを指定する必要はありません。 | ||
| `.env`ファイルは、環境変数の指定を簡略化するために慣習的に用いられるファイルです。`node --env-file=.env main.js`のように指定することで、`.env`ファイルに記述された環境変数を読み込ませることができます。`npx prisma init`コマンドを実行したときに作成される`prisma.config.ts`ファイルには、`dotenv`パッケージを用いて`.env`ファイルを読み込むコードが記述されているため、Prismaのコマンドを実行する際には、`.env`ファイルに記述された環境変数が自動的に読み込まれるようになっています。 | ||
| ::: |
Contributor
There was a problem hiding this comment.
この説明をdotenvパッケージについての説明から遠い場所で行う必要はあるのでしょうか?dotenvパッケージについてここで触れたしばらく後に、dotenvパッケージのtipがあるのは少し分かりづらい気がするのですが。
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prisma のバージョンを v7 にアップデート
自動生成ファイルが TypeScript ベースになったが、Node.js v22.18 のアップデートにより、問題なく使えるようになった。
https://nodejs.org/en/learn/typescript/run-natively