Commit Graph

113 Commits

Author SHA1 Message Date
Matteo Gazzoni
32f4fcf0c7 select only real tables (and not views) in mssql (#5816)
* select only real tables (and not views) in mssql

* add table_catalog check

* Add changeset

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-05-21 21:11:19 +00:00
Rijk van Zanten
9335372400 Foreign Key Constraints (#5615)
* Bump knex-schema-inspector

* Fix cli role name attr

* Update relation type

* Restructure relations

* Restructure relations table

* Update api type for relation record

* Fetch relations in new structure

* Update schema-inspector

* Use new relations schema structure in api

* Update relations GETters

* Add default value to one deselect

* Add create relationship on existing field

* Add updating existing relationship

* Add delete relations

* Add relations query resolver

* Add graphql mutations for relations

* Fix reading from wrong name

* Fix wrong method name

* No idea why this flip flops every install

* Update relation type

* Accept null in use-collection composable

* Use new relations structure in translations

* Use new relations structure in new-collection

* Start updating field detail store

* Renames for new relations structure

* Silently ignore passed collection/field in relation update

* Fix setting pk field in m2o relational setup

* Small tweaks in o2m setup

* Fix m2m setup

* Tweak m2o setup

* Fix m2a setup

* Allow null for related collection (m2a)

* Fix languages code name

* Fix migration default value

* Fix relational cleanup in collections/fields

* Fix transaction problem in field delete

* Fix inserting relational o2m items

* Don't execute updateByQuery on empty item set

Fixes #5710, fixes #5070

* Show referential action input on m2o

* Finish language for m2o

* Show triggers config on o2m

* Delete items on one_deselect_item delete

* Fix naming, show relational trigger config on m2m

* Tweak language, add setup to m2a

* Fix linter warnings

* Add trigger setup for translations

* fix Edit non-schema relationship issue

* Sync existing on_delete triggers in o2m setup

* Add migration to setup foreign key constraints

* Update illegal FK values before setting constraint

* Fix MySQL unsigned vs not-unsigned in FK creation

* Use pretty names for labels in relational triggers

* Prefix auto-junction when system table

Fixes #5493

* Add system foreign key triggers

Fixes #5749

* Update docs
2021-05-19 12:29:16 -04:00
rijkvanzanten
1d7e977eb8 v9.0.0-rc.69 2021-05-17 18:21:49 -04:00
rijkvanzanten
8e8f93ac62 Pull parseDefaultValue from new location
Fixes #5733
2021-05-17 15:36:39 -04:00
rijkvanzanten
8a94ff06ed v9.0.0-rc.68 2021-05-15 11:28:39 -04:00
rijkvanzanten
4885cd0ca5 v9.0.0-rc.67 2021-05-14 23:07:20 -04:00
rijkvanzanten
cad0e7b904 v9.0.0-rc.66 2021-05-14 18:52:46 -04:00
rijkvanzanten
6f51fa4483 Bump githead 2021-05-14 16:29:36 -04:00
rijkvanzanten
24621f3934 v9.0.0-rc.65 2021-05-14 16:27:03 -04:00
rijkvanzanten
a86c0832b0 v9.0.0-rc.64 2021-05-07 16:36:58 -04:00
rijkvanzanten
5df6696bc0 v9.0.0-rc.63 2021-05-07 14:42:29 -04:00
Oreille
da1c3ed9a3 Added support for PostgreSQL identity column (#5502) 2021-05-05 17:52:41 -04:00
rijkvanzanten
010eabad27 Format remaining md files 2021-05-04 18:52:08 -04:00
dependabot[bot]
e597fcff56 Bump npm-watch from 0.7.0 to 0.9.0 (#5445)
Bumps [npm-watch](https://github.com/M-Zuber/npm-watch) from 0.7.0 to 0.9.0.
- [Release notes](https://github.com/M-Zuber/npm-watch/releases)
- [Commits](https://github.com/M-Zuber/npm-watch/compare/v0.7.0...v0.9.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-04 09:30:29 -04:00
Aiden Foxx
f9a01d6684 [OracleDB] Extended schema-inspector to add AUTO_INCREMENT to columnInfo (#5408)
* Extended knex to add AUTO_INCREMENT to oracle columnInfo

* TS: Added missing return type
2021-05-03 09:34:45 -04:00
rijkvanzanten
c653b16729 v9.0.0-rc.62 2021-05-03 09:32:25 -04:00
rijkvanzanten
801e868554 Fix remaining eslint errors
h/t @paescuj
2021-04-29 15:55:12 -04:00
Pascal Jufer
acd41eb0be Syntax fixes (#5367)
* Declare return types on functions

And a very few other type related minor fixes

* Minor syntax fixes

* Remove unnecessary escape chars in regexes
* Remove unnecessary awaits
* Replace deprecated req.connection with req.socket
* Replace deprecated upload with uploadOne
* Remove unnecessary eslint-disable-next-line comments
* Comment empty functions / catch or finally clauses
* Fix irregular whitespaces
* Add missing returns (null)
* Remove unreachable code
* A few logical fixes
* Remove / Handle non-null assertions which are certainly unnecessary (e.g. in
tests)
2021-04-29 12:11:43 -04:00
Aiden Foxx
da826e2a1a Update oracledb.ts (#5331)
As explained in the code comment, Oracle doesn't return "AUTO_INCREMENT", causing `authorization.ts` to throw a error that primary keys are required values.
2021-04-28 14:07:15 -04:00
Aiden Foxx
dc973d37f4 Update oracledb.ts (#5327)
As defined by Oracle, NULLABLE should return "Y" or "N":

https://docs.oracle.com/cd/B19306_01/server.102/b14237/statviews_2094.htm
2021-04-28 14:53:17 +00:00
rijkvanzanten
3e89bcc239 v9.0.0-rc.61 2021-04-26 18:49:04 -04:00
rijkvanzanten
d9b0fc1e33 v9.0.0-rc.60 2021-04-22 17:59:11 -04:00
rijkvanzanten
0dfad1e96e v9.0.0-rc.59 2021-04-15 12:09:58 -04:00
rijkvanzanten
16b1a4e76e v9.0.0-rc.58 2021-04-14 19:52:03 -04:00
rijkvanzanten
1bfa128308 v9.0.0-rc.57 2021-04-09 20:30:10 -04:00
rijkvanzanten
c4e1e40279 Fix @directus/schema not reading Oracle overview correctly
Fixes #4735
2021-04-09 19:28:00 -04:00
rijkvanzanten
f8f843e5be v9.0.0-rc.56 2021-04-08 17:41:53 -04:00
rijkvanzanten
73f7ac8f3f v9.0.0-rc.55 2021-04-07 13:00:16 -04:00
rijkvanzanten
08958fec23 v9.0.0-rc.54 2021-04-06 18:45:32 -04:00
rijkvanzanten
fb91fd57e0 v9.0.0-rc.53 2021-03-30 13:17:52 -04:00
rijkvanzanten
0ff8d62e9c Remove package-lock files from sub-packages
Fixes cross-package versioning problems
2021-03-29 15:41:24 -04:00
rijkvanzanten
9b6869e068 v9.0.0-rc.52 2021-03-29 14:53:22 -04:00
Stephen O'Connor
bb9b39187b Remove semi-colon to avoid ORA-00933 (#4726) 2021-03-29 08:59:34 -04:00
Rijk van Zanten
c310afa846 Rely on npm Workspaces for module resolving (#4656)
* Move devDeps to API

* Move app to npm workspaces

* Tweaks / add lockfiles

* Add locks, fix devdeps across packages

* Move eslint config rootlevel

* Use eslint fix for vue files instead of vue-cli-service

* Add global prettier format option

* Create lockfiles for all packages

* Replace husky with simple-git-hooks
2021-03-24 16:01:49 -04:00
rijkvanzanten
aa15da7c65 v9.0.0-rc.51 2021-03-16 15:56:56 -04:00
rijkvanzanten
340aa2deef Fix MySQL not correctly scoping columns to database 2021-03-16 11:26:57 -04:00
rijkvanzanten
42507ae52f v9.0.0-rc.50 2021-03-12 18:32:20 -05:00
Adrian Dimitrov
51a0044d7f In mysql, select only tables (#4501) 2021-03-12 18:12:18 -05:00
rijkvanzanten
b17f3e0911 v9.0.0-rc.49 2021-03-11 18:57:25 -05:00
Martijn Boland
9897e3d39e Added 'AUTO_INCREMENT' for mssql identity columns (#4494)
* Added 'AUTO_INCREMENT' for mssql identity columns

* Removed obsolete method

Co-authored-by: Martijn Boland <martijn@taiga.nl>
2021-03-11 18:09:06 -05:00
rijkvanzanten
3803333025 v9.0.0-rc.48 2021-03-11 07:42:15 -05:00
rijkvanzanten
71bf628955 v9.0.0-rc.47 2021-03-11 07:38:26 -05:00
rijkvanzanten
33f36d2485 v9.0.0-rc.46 2021-03-10 17:39:31 -05:00
Rijk van Zanten
971a18c219 Database Error Abstraction (#4465)
* Start on database-error abstraction layer

* Add SQLite error abstraction

* Enable SQLite foreign key support

* Cleanup sqlite dialect slightly

Does it matter? Not really!

* Add MySQL error abstraction

* WIP Almost done with MSSQL

* Add correct error handling for MS SQL

* Fix mysql errors by not relying on value order

* Don't rely on sql in postgres exception translation

* Fix sqlite error parsing

* Remove foreign key constraint from activity to collections

A collection can be DB-only, but we still want to track activity for non-meta collections

* Translate error on update as well
2021-03-10 17:16:15 -05:00
Rijk van Zanten
97dcdad847 OracleDB baby steps (#4464)
* Allow external connections in oracle debug

* Fix oracle overview query

* Use correct alive check for oracle

* Remove unused import

* Validate correct env vars for oracle
2021-03-10 16:58:49 -05:00
Rijk van Zanten
291643e0b4 Fix installing on MS SQL (#4455)
Fixes #3158, fixes #3608
2021-03-09 18:43:03 -05:00
rijkvanzanten
87ed604f18 v9.0.0-rc.45 2021-03-05 18:03:27 -05:00
Rijk van Zanten
1db99e0828 Cleanup schema inspector (#4404)
* Rely on knex-schema-inspector

* Update packages
2021-03-05 17:06:07 -05:00
Nicola Krumschmidt
08293b8570 Update Knex to version 0.95.0 (#4374)
* Update Knex to version 0.95.0

* Fix formatting in schema dialects

* Fix Knex imports

* Update package-lock

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-03-03 19:37:44 -05:00
rijkvanzanten
eb4deaa955 Default field sort order to database ordinal sort
And use alphabetical where appropriate

Fixes #4341
2021-03-03 18:36:21 -05:00