-
-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
117 changed files
with
17,036 additions
and
10,564 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* @sequelize/code-reviewers |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: auto-update PRs & label conflicts | ||
on: | ||
push: | ||
branches: | ||
- main | ||
# can also be used with the pull_request event | ||
pull_request_target: | ||
types: | ||
- synchronize | ||
# allow the workflow to correct any label incorrectly added or removed by a user. | ||
- labeled | ||
- unlabeled | ||
# update the PR as soon as the auto-merge is enabled. | ||
- auto_merge_enabled | ||
# process the PR once they appear in the search filters | ||
- ready_for_review | ||
- opened | ||
- reopened | ||
jobs: | ||
autoupdate: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Generate Sequelize Bot Token | ||
id: generate-token | ||
uses: actions/create-github-app-token@v1 | ||
with: | ||
app-id: '${{ secrets.SEQUELIZE_BOT_APP_ID }}' | ||
private-key: '${{ secrets.SEQUELIZE_BOT_PRIVATE_KEY }}' | ||
- uses: sequelize/pr-auto-update-and-handle-conflicts@257ac5f68859672393e3320495164251140bd801 # 1.0.1 | ||
with: | ||
conflict-label: 'conflicted' | ||
conflict-requires-ready-state: 'ready_for_review' | ||
conflict-excluded-authors: 'bot/renovate' | ||
update-pr-branches: true | ||
update-requires-auto-merge: true | ||
update-requires-ready-state: 'ready_for_review' | ||
update-excluded-authors: 'bot/renovate' | ||
update-excluded-labels: 'no-autoupdate' | ||
env: | ||
GITHUB_TOKEN: '${{ steps.generate-token.outputs.token }}' |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npx lint-staged |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"singleQuote": true | ||
"singleQuote": true | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
:::info | ||
|
||
Sequelize currently only supports the [_legacy/experimental decorator format_](https://github.com/tc39/proposal-decorators#how-does-this-proposal-compare-to-other-versions-of-decorators). | ||
Support for the [_new decorator format_](https://github.com/tc39/proposal-decorators) will be added in a future release. | ||
|
||
All decorators must be imported from `@sequelize/core/decorators-legacy`: | ||
|
||
```ts | ||
import { Attribute, Table } from '@sequelize/core/decorators-legacy'; | ||
``` | ||
|
||
Using legacy decorators requires to use a transpiler such as [TypeScript](https://www.typescriptlang.org/docs/handbook/decorators.html#decorators), | ||
[Babel](https://babeljs.io/docs/babel-plugin-proposal-decorators) or others to compile them to JavaScript. | ||
Alternatively, Sequelize also supports [a legacy approach](../other-topics/legacy-model-definitions.mdx) that does not require using decorators, but this is discouraged. | ||
|
||
::: |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
:::caution | ||
|
||
The generation of values for `DataTypes.NOW` and other JavaScript functions are not handled by the Database, | ||
but by Sequelize itself. This means that they will only be used when using Model methods. They will not be used in [raw queries](../querying/raw-queries.mdx), | ||
in [migrations](../models/migrations.md), and all other places where Sequelize does not have access to the Model. | ||
|
||
Read about SQL based alternatives in [Dynamic SQL default values](../models/defining-models.mdx#dynamic-sql-default-values). | ||
|
||
::: |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { DialectTableFilter } from '@site/src/components/dialect-table-filter.tsx'; | ||
|
||
<DialectTableFilter> | ||
|
||
| | PostgreSQL | MariaDB | MySQL | MSSQL | SQLite | Snowflake | db2 | ibmi | | ||
|----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------|----------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------|--------|-----------|-----|------| | ||
| `uuidV1` | [`uuid_generate_v1`](https://www.postgresql.org/docs/current/uuid-ossp.html) (requires `uuid-ossp`) | [`UUID`](https://mariadb.com/kb/en/uuid/) | [`UUID`](https://dev.mysql.com/doc/refman/8.0/en/miscellaneous-functions.html#function_uuid) | N/A | N/A | N/A | N/A | N/A | | ||
| `uuidV4` | __pg >= v13__: [`gen_random_uuid`](https://www.postgresql.org/docs/current/functions-uuid.html) <br/>__pg < v13__: [`uuid_generate_v4`](https://www.postgresql.org/docs/current/uuid-ossp.html) (requires `uuid-ossp`) | N/A | N/A | [`NEWID`](https://learn.microsoft.com/en-us/sql/t-sql/functions/newid-transact-sql?view=sql-server-ver16) | N/A | N/A | N/A | N/A | | ||
|
||
</DialectTableFilter> |
Oops, something went wrong.