Skip to content

feat: namedConstraints preview feature - #2102

Merged
molebox merged 17 commits into
mainfrom
ConstraintNames
Aug 10, 2021
Merged

molebox merged 17 commits into
mainfrom
ConstraintNames

Conversation

@janpio janpio left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR removes quite a few Relational only or MongoDB only tabs, that had a second empty tab. Is that intentional or some merge artifact? It's pretty unrelated @do4gr

@do4gr

do4gr commented Aug 6, 2021 •

Copy link
Copy Markdown
Member Author

@molebox removed those when he tried to get the PR in a running state I think.

}
```

#### Index names

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this keep the headline to be linkable?
Should we have a similar headline in the other mentions of customizing the constraint names?

@molebox

molebox commented Aug 6, 2021

Copy link
Copy Markdown
Contributor

@molebox removed those when he tried to get the PR in a running state I think.

I did indeed remove them they confuse me, a tabs functionality is to provide more than 1 piece of information in an enclosed environment. I didn't see the point in having one tab. In most (if not all, i think) of the section where the tabs was removed, the text surrounding it indicates that its for relational databases, or is explicitly for mongodb

@janpio

janpio commented Aug 6, 2021

Copy link
Copy Markdown
Contributor

That's fair. But what is the connection to the namedConstraints preview feature?

@molebox

molebox commented Aug 6, 2021 •

Copy link
Copy Markdown
Contributor

That's fair. But what is the connection to the namedConstraints preview feature?

No direct connection apart from the tabs causing lots of issues with rendering the pages, I removed them as i went about fixing the issues left over from the merge up.

I of course understand what you're getting at here, this isnt related to this PR. But it was a product of refactoring so the pages would render.

respect-that

@janpio

janpio commented Aug 6, 2021

Copy link
Copy Markdown
Contributor

Just important to know. If it bothers me during the review, I can quickly extract that change into its own PR - but I don't expect it will. This change is small enough.

@molebox

molebox commented Aug 6, 2021

Copy link
Copy Markdown
Contributor

Just important to know. If it bothers me during the review, I can quickly extract that change into its own PR - but I don't expect it will. This change is small enough.

Totally fair, tbh i didnt consider it an addition (or subtraction if you will) I was just trying to fix the pages. As i was doing it i wondered why we had these 1 tab sections.

…in-underlying-database.mdx

Co-authored-by: Jan Piotrowski <[email protected]>
@janpio janpio changed the title Rebuild Constraint Name Changes feat: namedConstraints preview feature Aug 6, 2021

## Optional: Enable the <inlinecode>namedConstraints</inlinecode> Preview feature

If you choose to enable the `namedConstraints` Preview feature, choose a workflow (Prisma Migrate or Introspection) and upgrade path that suits your requirements:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 links for Migrate + Introspection would be good here, so you can get an overview which options are meant and so you can just click them.

npx prisma migrate deploy
```

#### Upgrade path 2: I want to use Prismas default constraint and index names

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't there also a upgrade path 3 "Do weird combination of things"?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe. You can of course mix and match.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optimally the document would be so clear, that people can read the intro and already understand the general problem and the options, then can follow some "guides" that spell out the exact tiny steps.

@Jolg42

Jolg42 commented Aug 9, 2021

Copy link
Copy Markdown
Contributor

Looks like we have many mention of Prisma "convention".
Maybe it would be nice to link somewhere so it's easy to find out what it is.

For example on this page it's not linked anywhere
https://deploy-preview-2102--prisma2-docs.netlify.app/docs/guides/upgrade-guides/upgrading-to-latest/upgrade-to-2290

@janpio

janpio commented Aug 9, 2021

Copy link
Copy Markdown
Contributor

For example on this page it's not linked anywhere
deploy-preview-2102--prisma2-docs.netlify.app/docs/guides/upgrade-guides/upgrading-to-latest/upgrade-to-2290

This page does not exist any more.

Most of the mentions of "Prisma convention" have comments open, that this should be de-emphasized and mention that people just want different things than the defaults often for various reasons.

janpio and others added 5 commits August 9, 2021 13:16
…in-underlying-database.mdx

Co-authored-by: Jan Piotrowski <[email protected]>
…in-underlying-database.mdx

Co-authored-by: Jan Piotrowski <[email protected]>
…onstraintNames

# Conflicts:
#	content/200-concepts/100-components/01-prisma-schema/07-names-in-underlying-database.mdx
@molebox

molebox commented Aug 10, 2021

Copy link
Copy Markdown
Contributor

We have decided to merge this PR in its current state, with follow up work to be done under this issue: #2120

@molebox
molebox merged commit 4284495 into main Aug 10, 2021
@molebox
molebox deleted the ConstraintNames branch August 10, 2021 08:32
matthewmueller pushed a commit that referenced this pull request Aug 10, 2021
* start porting constraint changes again

* remaining old content ported

* first round of fixes

* add feedback link

* tag fixes

* Fixed errors with tab component

* fix naming and broken links

add some todos

* Update content/200-concepts/100-components/01-prisma-schema/07-names-in-underlying-database.mdx

Co-authored-by: Jan Piotrowski <[email protected]>

* Update content/200-concepts/100-components/01-prisma-schema/07-names-in-underlying-database.mdx

Co-authored-by: Jan Piotrowski <[email protected]>

* Update content/300-guides/300-upgrade-guides/200-upgrading-to-latest/10-upgrade-to-2290.mdx

Co-authored-by: Jan Piotrowski <[email protected]>

* Added new upgrade structure and preview feature section

* Restructure `namedConstraints` preview feature guide page (#2112)

* Update content/200-concepts/100-components/01-prisma-schema/07-names-in-underlying-database.mdx

Co-authored-by: Jan Piotrowski <[email protected]>

* Update content/200-concepts/100-components/01-prisma-schema/07-names-in-underlying-database.mdx

Co-authored-by: Jan Piotrowski <[email protected]>

* incorporate datamodel feedback

* flesh out new structure for upgrade guide

Co-authored-by: Rich Haines <[email protected]>
Co-authored-by: Jan Piotrowski <[email protected]>
matthewmueller added a commit that referenced this pull request Aug 10, 2021
* add interactive transaction documentation

* make husky executable

* Update content/200-concepts/100-components/02-prisma-client/058-transactions.mdx

Co-authored-by: Rich Haines <[email protected]>

* Update content/200-concepts/100-components/02-prisma-client/058-transactions.mdx

Co-authored-by: Rich Haines <[email protected]>

* fix(prisma-client-reference): Specify atomic number operations behavior on null values (#2077)

Clarify behaviour of null values with atomic number operations

* Typo in Line 2159 "isAdmmin" of 100-prisma-schema-reference (#2100)

Fixed by changing isAdmmin to isAdmin.

* Update About section with release notes (#2099)

* add npm install --save bson (#2097)

* add npm install --save bson

* Update content/200-concepts/200-database-connectors/07-mongodb.mdx

Co-authored-by: Rich Haines <[email protected]>

Co-authored-by: Rich Haines <[email protected]>

* Ref actions update table (#2103)

* Cross linked debug info

* Added note to update table about migrate and schema - ref actions

* fix(data-model): model => data model (#1980)

Fix a few location where it used `model` but `data model` was meant.

* fix(environment-variables-reference): Elaborate on PRISMA_QUERY_ENGINE_BINARY (#2069)

* fix(environment-variables-reference): Elaborate on PRISMA_QUERY_ENGINE_BINARY

* Update content/400-reference/200-api-reference/300-environment-variables-reference.mdx

Co-authored-by: Rich Haines <[email protected]>

Co-authored-by: Rich Haines <[email protected]>

* fix(deps): update dependency @prisma/lens to v0.0.196

* Update unit test guide (#2110)

* Cross linked debug info

* Changed import to new interface

* Fix prisly links on error code page (#2111)

* Cross linked debug info

* Fixed broken links on error code page

* fix: 085-query-optimization-performance.mdx (#2108)

* Indent admonition to preserve numbering (#2107)

Closes #1744

* Fix typo in docker-compose command (#2106)

* Fix typo in docker-compose command

Missing "-" in ```docker-compose up -d```

* Update index.mdx (#2058)

* Fix minor typo in 01-database-features.mdx (#2117)

no supported -> not supported

* Made MongoDB authorId optional (#2104)

The mongodb example did not make the authorId optional

* feat: `namedConstraints` preview feature (#2102)

* start porting constraint changes again

* remaining old content ported

* first round of fixes

* add feedback link

* tag fixes

* Fixed errors with tab component

* fix naming and broken links

add some todos

* Update content/200-concepts/100-components/01-prisma-schema/07-names-in-underlying-database.mdx

Co-authored-by: Jan Piotrowski <[email protected]>

* Update content/200-concepts/100-components/01-prisma-schema/07-names-in-underlying-database.mdx

Co-authored-by: Jan Piotrowski <[email protected]>

* Update content/300-guides/300-upgrade-guides/200-upgrading-to-latest/10-upgrade-to-2290.mdx

Co-authored-by: Jan Piotrowski <[email protected]>

* Added new upgrade structure and preview feature section

* Restructure `namedConstraints` preview feature guide page (#2112)

* Update content/200-concepts/100-components/01-prisma-schema/07-names-in-underlying-database.mdx

Co-authored-by: Jan Piotrowski <[email protected]>

* Update content/200-concepts/100-components/01-prisma-schema/07-names-in-underlying-database.mdx

Co-authored-by: Jan Piotrowski <[email protected]>

* incorporate datamodel feedback

* flesh out new structure for upgrade guide

Co-authored-by: Rich Haines <[email protected]>
Co-authored-by: Jan Piotrowski <[email protected]>

* New dev env section (#2119)

* Cross linked debug info

* Added new dev env section, moved files, changed links

* Update content/300-guides/125-development-environment/index.mdx

Co-authored-by: Hervé Labas <[email protected]>

Co-authored-by: Hervé Labas <[email protected]>

* fix(deps): update dependency prismjs to v1.24.0 [security] (#1936)

Co-authored-by: Renovate Bot <[email protected]>

* fix: Improve Client preview feature list (#2124)

- Unify "Submit feedback" styling
- Add "since 2.x.0" with link to release notes
- Fix MongoDB feedback issue link
- Add referentialActions feedback link
- Sort by release version

* namedConstraints: Start restructuring upgrade guide (#2125)

* start restructuring upgrade guide

* finalized upgrade path structure

* preview feedback

* more formatting

* fix(deps): update dependency @prisma/lens to v0.0.202 (#2114)

Co-authored-by: Renovate Bot <[email protected]>

* fix(relations): Change nav order (#2128)

* Cross linked debug info

* Moved ref actions down nav list, fixed code block indent

* fix(percy): Only 1 screen width to avoid more noise (#2129)

* add interactive transaction documentation

* make the try catch description explicit with a code example

Co-authored-by: Rich Haines <[email protected]>
Co-authored-by: Ollie Chick <[email protected]>
Co-authored-by: Patty Arunyavikul <[email protected]>
Co-authored-by: Hervé Labas <[email protected]>
Co-authored-by: Joël Galeran <[email protected]>
Co-authored-by: Jan Piotrowski <[email protected]>
Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: erichen114 <[email protected]>
Co-authored-by: Jason Boxman <[email protected]>
Co-authored-by: Tasin Ishmam <[email protected]>
Co-authored-by: Nguyen You <[email protected]>
Co-authored-by: Patrick Strassmann <[email protected]>
Co-authored-by: P Christopher Bowers <[email protected]>
Co-authored-by: Matthias Oertel <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants