@@ -31,29 +31,31 @@ This plugin gives you a new and isolated database for your preview deployments i
3131
3232[[plugins ]]
3333 package = " @snaplet/netlify-preview-database-plugin"
34-
35- [plugins .inputs ]
36- databaseEnvVar = " DATABASE_URL"
37- databaseCreateCommand = " snaplet db create --git --latest"
38- databaseUrlCommand = " snaplet db url --git"
39- reset = false
4034```
4135** Note:** We check the deploy context associated with the build. You can configure your settings by deploy context.
4236
43- #### Inputs (All inputs are optional)
37+ #### Inputs
4438
4539``` yaml
4640- name : databaseEnvVar
41+ required : false
4742 description : Database environment variable name
43+ default : " DATABASE_URL"
4844
4945- name : databaseCreateCommand
50- description : Command used to generate the preview database
46+ required : false
47+ description : Command used to generate the instant database
48+ default : " snaplet db create --git --latest"
5149
5250- name : databaseUrlCommand
53- description : Command used to get the preview database url
51+ required : false
52+ description : Command used to get the instant database url
53+ default : " snaplet db url --git"
5454
5555- name : reset
56+ required : false
5657 description : Reset the database state on each commit
58+ default : false
5759` ` `
5860
5961### 3. Set environment variables
@@ -69,7 +71,7 @@ This plugin gives you a new and isolated database for your preview deployments i
6971
7072[[plugins]]
7173# ...
72-
74+
7375 [context.deploy-preview.environment]
7476 SNAPLET_ACCESS_TOKEN="<YOUR_SNAPLET_ACCESS_TOKEN>"
7577` ` `
@@ -78,7 +80,6 @@ This plugin gives you a new and isolated database for your preview deployments i
7880
7981```
8082NETLIFY_ACCESS_TOKEN=// API Access token found in Netlify user settings.
81- NETLIFY_ACCOUNT_ID=// Account ID found in team settings
8283SNAPLET_ACCESS_TOKEN=// CLI Access token found in Snaplet UI
8384SNAPLET_PROJECT_ID=// Project ID found in Snaplet project settings.
8485```
0 commit comments