Browse Source

Merge branch 'develop' into feat/kanban-view

pull/3818/head
Wing-Kam Wong 2 years ago
parent
commit
ed02f9a36c
  1. 2
      .github/workflows/ci-cd.yml
  2. 6
      packages/nc-gui/components/general/FullScreen.vue
  3. 4
      packages/nc-gui/components/smartsheet-toolbar/ColumnFilter.vue
  4. 2
      packages/nc-gui/components/smartsheet/Grid.vue
  5. 10
      packages/nc-gui/pages/[projectType]/[projectId]/index/index.vue
  6. 16
      packages/nc-gui/pages/[projectType]/[projectId]/index/index/[type]/[title]/[[viewTitle]].vue
  7. 11
      packages/nc-lib-gui-backup/.gitignore
  8. 5
      packages/nc-lib-gui-backup/README.md
  9. 30
      packages/nc-lib-gui-backup/__tests__/xc-tool-web.test.js
  10. 53
      packages/nc-lib-gui-backup/lib/XcLibGui.js
  11. 22
      packages/nc-lib-gui-backup/license.txt
  12. 33
      packages/nc-lib-gui-backup/package.json
  13. 11
      packages/noco-docs-prev/.gitignore
  14. 21
      packages/noco-docs-prev/LICENSE
  15. 3
      packages/noco-docs-prev/README.md
  16. 7
      packages/noco-docs-prev/assets/main.css
  17. 15
      packages/noco-docs-prev/components/global/announcement.vue
  18. 33
      packages/noco-docs-prev/components/global/youtube.vue
  19. 70
      packages/noco-docs-prev/content/en/FAQs.md
  20. 49
      packages/noco-docs-prev/content/en/developer-resources/accessing-apis.md
  21. 26
      packages/noco-docs-prev/content/en/developer-resources/api-tokens.md
  22. 797
      packages/noco-docs-prev/content/en/developer-resources/graphql-apis.md
  23. 1208
      packages/noco-docs-prev/content/en/developer-resources/rest-apis.md
  24. 185
      packages/noco-docs-prev/content/en/developer-resources/webhooks.md
  25. 63
      packages/noco-docs-prev/content/en/engineering/publish.md
  26. 67
      packages/noco-docs-prev/content/en/engineering/translation.md
  27. 14
      packages/noco-docs-prev/content/en/getting-started/demos.md
  28. 324
      packages/noco-docs-prev/content/en/getting-started/installation.md
  29. 96
      packages/noco-docs-prev/content/en/getting-started/upgrading.md
  30. 88
      packages/noco-docs-prev/content/en/index.md
  31. 19
      packages/noco-docs-prev/content/en/setup-and-usages/audit.md
  32. 77
      packages/noco-docs-prev/content/en/setup-and-usages/column-operations.md
  33. 422
      packages/noco-docs-prev/content/en/setup-and-usages/column-types.md
  34. 90
      packages/noco-docs-prev/content/en/setup-and-usages/dashboard.md
  35. 130
      packages/noco-docs-prev/content/en/setup-and-usages/formulas.md
  36. 79
      packages/noco-docs-prev/content/en/setup-and-usages/link-to-another-record.md
  37. 53
      packages/noco-docs-prev/content/en/setup-and-usages/lookup.md
  38. 66
      packages/noco-docs-prev/content/en/setup-and-usages/meta-management.md
  39. 34
      packages/noco-docs-prev/content/en/setup-and-usages/primary-value.md
  40. 74
      packages/noco-docs-prev/content/en/setup-and-usages/rollup.md
  41. 95
      packages/noco-docs-prev/content/en/setup-and-usages/share-base.md
  42. 30
      packages/noco-docs-prev/content/en/setup-and-usages/sync-schema.md
  43. 114
      packages/noco-docs-prev/content/en/setup-and-usages/table-operations.md
  44. 109
      packages/noco-docs-prev/content/en/setup-and-usages/team-and-auth.md
  45. 71
      packages/noco-docs-prev/content/en/setup-and-usages/usage-information.md
  46. 11
      packages/noco-docs-prev/content/settings.json
  47. 11
      packages/noco-docs-prev/nuxt.config.js
  48. 29925
      packages/noco-docs-prev/package-lock.json
  49. 15
      packages/noco-docs-prev/package.json
  50. BIN
      packages/noco-docs-prev/static/architecture.png
  51. BIN
      packages/noco-docs-prev/static/favicon-128.png
  52. BIN
      packages/noco-docs-prev/static/favicon-16.png
  53. BIN
      packages/noco-docs-prev/static/favicon-32.png
  54. BIN
      packages/noco-docs-prev/static/favicon-64.png
  55. 4
      packages/noco-docs/content/en/engineering/architecture.md
  56. 129
      packages/noco-docs/content/en/engineering/builds-and-releases.md
  57. 20
      packages/noco-docs/content/en/engineering/development-setup.md
  58. 178
      packages/noco-docs/content/en/engineering/testing.md
  59. 40
      packages/noco-docs/content/en/engineering/translation.md
  60. 189
      packages/noco-docs/content/en/getting-started/installation.md
  61. 14
      packages/nocodb/src/lib/meta/api/metaDiffApis.ts
  62. 22
      packages/nocodb/src/lib/models/Column.ts
  63. 0
      packages/nocodb/tests/unit/.env
  64. 4
      packages/nocodb/tests/unit/rest/tests/table.test.ts

2
.github/workflows/ci-cd.yml

@ -673,4 +673,4 @@ jobs:
run: docker-compose -f ./scripts/docker-compose-cypress.yml up -d
- name: run unit tests
working-directory: ./packages/nocodb
run: npm run test:unit
run: npm run test:unit

6
packages/nc-gui/components/general/FullScreen.vue

@ -14,9 +14,11 @@ const isSidebarsOpen = computed({
</script>
<template>
<a-tooltip>
<a-tooltip placement="left">
<!-- todo: i18n -->
<template #title> {{ isSidebarsOpen ? 'Full width' : 'Exit full width' }}</template>
<template #title>
<span class="text-xs">{{ isSidebarsOpen ? 'Full width' : 'Exit full width' }}</span>
</template>
<div
v-e="['c:toolbar:fullscreen']"
class="nc-fullscreen-btn cursor-pointer flex align-center self-center px-2 py-2 mr-2"

4
packages/nc-gui/components/smartsheet-toolbar/ColumnFilter.vue

@ -108,7 +108,7 @@ watch(
)
watch(
() => filters.value.length ,
() => filters.value.length,
(length) => {
emit('update:filtersLength', length ?? 0)
},
@ -281,7 +281,7 @@ defineExpose({
{{ $t('activity.addFilter') }}
</div>
</a-button>
<a-button class="text-capitalize !text-gray-500" v-if="!webHook" @click.stop="addFilterGroup">
<a-button v-if="!webHook" class="text-capitalize !text-gray-500" @click.stop="addFilterGroup">
<div class="flex items-center gap-1">
<!-- <v-icon small color="grey"> mdi-plus </v-icon> -->
<!-- Add Filter Group -->

2
packages/nc-gui/components/smartsheet/Grid.vue

@ -381,7 +381,7 @@ onBeforeUnmount(async () => {
<template>
<div class="flex flex-col h-full min-h-0 w-full">
<general-overlay :model-value="isLoading" inline transition>
<general-overlay :model-value="isLoading" inline transition class="!bg-opacity-15">
<div class="flex items-center justify-center h-full w-full">
<a-spin size="large" />
</div>

10
packages/nc-gui/pages/[projectType]/[projectId]/index/index.vue

@ -148,14 +148,4 @@ function onEdit(targetKey: number, action: 'add' | 'remove' | string) {
:deep(.ant-tabs-tab-remove) {
@apply mt-[3px];
}
.nc-tab-bar {
:deep(.nc-fullscreen-icon) {
@apply opacity-0 transition;
}
&:hover :deep(.nc-fullscreen-icon) {
@apply opacity-100;
}
}
</style>

16
packages/nc-gui/pages/[projectType]/[projectId]/index/index/[type]/[title]/[[viewTitle]].vue

@ -1,10 +1,10 @@
<script setup lang="ts">
import type { TabItem } from '~/composables'
import { TabMetaInj } from '#imports'
import { TabMetaInj, until } from '#imports'
const { getMeta } = useMetas()
const { project, projectLoadedHook } = useProject()
const { tables } = useProject()
const route = useRoute()
@ -15,14 +15,12 @@ const activeTab = inject(
computed(() => ({} as TabItem)),
)
if (!project.value.id) {
projectLoadedHook(async () => {
await getMeta(route.params.title as string, true)
loading.value = false
/** wait until table list loads since meta load requires table list **/
until(tables)
.toMatch((tables) => tables.length > 0)
.then(() => {
getMeta(route.params.title as string, true).finally(() => (loading.value = false))
})
} else {
getMeta(route.params.title as string, true).finally(() => (loading.value = false))
}
</script>
<template>

11
packages/nc-lib-gui-backup/.gitignore vendored

@ -1,11 +0,0 @@
/node_modules/
#build
src/**.js
.idea/*
coverage
.nyc_output
*.log
yarn.lock
/lib/dist/

5
packages/nc-lib-gui-backup/README.md

@ -1,5 +0,0 @@
# nc-lib-gui
This package is the build version of ``nc-gui`` which will be used in ``packages/nocodb``. The built files should be located in ``packages/nc-lib-gui/lib/dist/``.
To build the frontend and copy the built files to dist directory, run ``npm run build:copy`` under ``packages/nc-gui/``.

30
packages/nc-lib-gui-backup/__tests__/xc-tool-web.test.js

@ -1,30 +0,0 @@
'use strict';
const xcToolWeb = require('..');
describe('xc-tool-web', () => {
it('needs tests');
});
/**
* @copyright Copyright (c) 2021, Xgene Cloud Ltd
*
* @author Naveen MR <oof1lab@gmail.com>
* @author Pranav C Balan <pranavxc@gmail.com>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/

53
packages/nc-lib-gui-backup/lib/XcLibGui.js

@ -1,53 +0,0 @@
const express = require('express');
const path = require('path');
class XcLibGui {
constructor(config) {
this.config = config;
}
expressMiddleware() {
const router = express.Router();
router.use('/', express.static(path.join(__dirname, 'dist')));
return router;
}
addListener(handler) {
}
destroy() {
}
reInitialize(config) {
this.config = config;
}
}
module.exports = XcLibGui;
/**
* @copyright Copyright (c) 2021, Xgene Cloud Ltd
*
* @author Naveen MR <oof1lab@gmail.com>
* @author Pranav C Balan <pranavxc@gmail.com>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/

22
packages/nc-lib-gui-backup/license.txt

@ -1,22 +0,0 @@
/**
* @copyright Copyright (c) 2021, Xgene Cloud Ltd
*
* @author Naveen MR <oof1lab@gmail.com>
* @author Pranav C Balan <pranavxc@gmail.com>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/

33
packages/nc-lib-gui-backup/package.json

@ -1,33 +0,0 @@
{
"name": "nc-lib-gui",
"version": "0.92.4",
"description": "> TODO: description",
"author": "“pranavxc” <pranavxc@gmail.com>",
"homepage": "https://gitlab.com/xgenecloud-ts/xgenecloud-ts#readme",
"license": "AGPL-3.0-or-later",
"main": "lib/XcLibGui.js",
"directories": {
"lib": "lib",
"test": "__tests__"
},
"files": [
"lib"
],
"repository": {
"type": "git",
"url": "git+ssh://git@gitlab.com/xgenecloud-ts/xgenecloud-ts.git"
},
"scripts": {
"test": "echo \"Error: run tests from root\" && exit 1"
},
"bugs": {
"url": "https://gitlab.com/xgenecloud-ts/xgenecloud-ts/issues"
},
"dependencies": {
"axios": "^0.19.2",
"body-parser": "^1.19.0",
"dayjs": "^1.10.4",
"express": "^4.17.1",
"vuedraggable": "^2.24.3"
}
}

11
packages/noco-docs-prev/.gitignore vendored

@ -1,11 +0,0 @@
node_modules
*.iml
.idea
*.log*
.nuxt
.vscode
.DS_Store
coverage
dist
sw.*
.env

21
packages/noco-docs-prev/LICENSE

@ -1,21 +0,0 @@
MIT License
Copyright (c) 2021 nocodb
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

3
packages/noco-docs-prev/README.md

@ -1,3 +0,0 @@
# NocoDB Documentation (Previous Versions)
We're no longer updating this content regularly. For version `v0.90` onwards, please check out [here](https://docs.nocodb.com/).

7
packages/noco-docs-prev/assets/main.css

@ -1,7 +0,0 @@
main.container{
max-width:100% !important;
}
footer a[href="https://nuxtjs.org"]{
display: none;
}

15
packages/noco-docs-prev/components/global/announcement.vue

@ -1,15 +0,0 @@
<template>
<alert type="warning">
If you are using NocoDB with version 0.90 onwards, please check out the latest documentation <a href="https://docs.nocodb.com/" target="_blank">here</a> instead. The documentation for previous versions is no longer maintained and will be completely removed on 30 Jun 2022. See <a href="https://github.com/nocodb/nocodb/issues/1564" target="_blank">v0.90 Important Announcement</a> for more.
</alert>
</template>
<script>
export default {
name: "announcement",
}
</script>
<style scoped>
</style>

33
packages/noco-docs-prev/components/global/youtube.vue

@ -1,33 +0,0 @@
<template>
<div>
<iframe type="text/html" width="100%" style="height:100%"
:src="`https://www.youtube.com/embed/${id}`"
frameborder="0" allowfullscreen></iframe>
</div>
</template>
<script>
export default {
name: "youtube",
props: {
id: String
}
}
</script>
<style scoped>
div {
background-color: red;
width: 100%;
padding-top: min(500px,56%);
position: relative;
}
iframe {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
}
</style>

70
packages/noco-docs-prev/content/en/FAQs.md

@ -1,70 +0,0 @@
---
title: 'FAQs'
description: 'FAQs'
position: 1000000
category: 'FAQ'
fullscreen: true
menuTitle: 'FAQs'
---
<announcement></announcement>
## How to upgrade NocoDB ?
- Please see [here](https://docs.nocodb.com/getting-started/upgrading)
## How to export CSV from the grid view ?
- Available since [0.81.1](https://github.com/nocodb/nocodb/releases/tag/0.81.1)
## How to share the project with read only access ?
- Either you can invite by email with 'viewer' access control
- Share the base with publicly accessible link. Available since [0.82.0](https://github.com/nocodb/nocodb/releases/tag/0.82.0)
## How to check my current NocoDB version ?
- You can hover the NocoDB icon on the top left corner or check ``PackageVersion`` in Project info.
![image](https://user-images.githubusercontent.com/35857179/127765903-3ae876ad-6b46-4520-9d11-679b80eb7b08.png)
## How to check my Project info ?
- You can click on top right icon and click ``Copy Project Info``.
![image](https://user-images.githubusercontent.com/35857179/127765860-968b0c64-f08d-4674-9ecc-4d5c5a00428b.png)
You should see the similar result as below.
```
Node: **v16.5.0**
Arch: **x64**
Platform: **darwin**
Docker: **false**
Database: **sqlite3**
ProjectOnRootDB: **true**
RootDB: **sqlite3**
PackageVersion: **0.11.6**
```
## What is available in free version ?
- NocoDB has just one version that is free & open source.
- In it you will notice advanced features are all available for free.
- ACL
- Collaboration
- Advanced views : Form View, Gallery view, Kanban (coming soon)
- Share view,
- Embed view
- Password protected view,
- Automations
- API token support.
- And we would never move these features from free to an enterprise version of NocoDB.
- There is no limitations to number of projects, rows or columns either.
## Do you plan to have enterprise edition ?
For features that make sense for enterprises like below - yes
- SSO, SLA, Organisation wide reports and analytics,
- Advanced Audit or ACL,
- Bespoke implementations & integrations,
- A hosted solution.
And increasing number of our customers are requesting it.
## How do we decide if a feature is enterprise or not ?
- Depends on the effort and whether the intended users are enterprises.

49
packages/noco-docs-prev/content/en/developer-resources/accessing-apis.md

@ -1,49 +0,0 @@
---
title: 'Accessing APIs'
description: 'Accessing APIs'
position: 1000
category: 'Developer Resources'
menuTitle: 'Accessing APIs'
---
<announcement></announcement>
## REST APIs
- Go to NocoDB Project, click the rightmost button and click ``Copy auth token``.
![image](https://user-images.githubusercontent.com/35857179/126187328-745943f2-c780-4109-b967-1b3f1c4a1dcd.png)
- Click the same button and click ``Swagger APIs Doc``.
![image](https://user-images.githubusercontent.com/35857179/126187534-32c41de9-f17d-4f95-9acc-88aaed044b36.png)
- Select ``Schemes`` and Click ``Authorize``.
![image](https://user-images.githubusercontent.com/35857179/126188482-f3aacabf-dbc5-41a8-a190-9f225347ebd1.png)
- Paste the token you just copy in step 1 and click Authorize
![image](https://user-images.githubusercontent.com/35857179/126188510-b3790348-6809-4182-911a-a4031ace2fd2.png)
## GraphQL APIs
- Go to NocoDB Project, click the rightmost button and click ``Copy auth token``.
![image](https://user-images.githubusercontent.com/35857179/126187624-03ee550d-71eb-499f-ad8b-54e32a94f729.png)
- Click the same button and click ``GraphQL APIs`.
![image](https://user-images.githubusercontent.com/35857179/126187581-22503b8d-f6dd-4a4e-8b12-a475c27354a2.png)
- Click ``REQUEST HEADERS``.
![image](https://user-images.githubusercontent.com/35857179/126188122-1aa7b153-f05a-46fd-953b-751376d708bf.png)
- Paste the token you just copy in step 1.
```json
{
"xc-auth": "YOUR_AUTH_TOKEN"
}
```

26
packages/noco-docs-prev/content/en/developer-resources/api-tokens.md

@ -1,26 +0,0 @@
---
title: 'API Tokens'
description: 'API Tokens'
position: 1040
category: 'Developer Resources'
menuTitle: 'API Tokens'
---
<announcement></announcement>
## API Tokens
NocoDB allows creating API tokens which allow it to be integrated seamlessly with 3rd party apps.
### Which HTTP Header to use ?
- ```xc-token``` header should be set when invoking the NocoDB APIs with the token.
### How to create a token ?
- ![1](https://user-images.githubusercontent.com/5435402/133734223-49bb1567-6cd2-43e5-bdda-aaccda741070.png)
- ![2](https://user-images.githubusercontent.com/5435402/133734234-5ca542b1-5843-46f7-b97b-9e686c6bf7ac.png)
- ![3](https://user-images.githubusercontent.com/5435402/133734238-33d5bdd0-5c97-4dbe-8e49-744193c3ac20.png)
- ![4](https://user-images.githubusercontent.com/5435402/133734239-7b530235-3352-497b-b23c-3a701290a569.png)
- ![5](https://user-images.githubusercontent.com/5435402/133734241-0f25bbd0-ab92-430a-9987-cc745d5b1b47.png)
- ![6](https://user-images.githubusercontent.com/5435402/133734243-6dc8527e-573d-45e2-8cd8-13a8beea0dfa.png)

797
packages/noco-docs-prev/content/en/developer-resources/graphql-apis.md

@ -1,797 +0,0 @@
---
title: 'GraphQL APIs'
position: 1020
category: 'Developer Resources'
menuTitle: 'GraphQL APIs'
---
<announcement></announcement>
## Features
* Generates GraphQL APIs for **ANY** MySql, Postgres, MSSQL, Sqlite database :fire:
* Serves GraphQL queries irrespective of naming conventions of primary keys, foreign keys, tables etc :fire:
* Support for composite primary keys :fire:
* Usual suspects : CRUD, List, FindOne, Count, Exists, Distinct
* Pagination
* Sorting
* Column filtering - Fields :fire:
* Row filtering - Where :fire:
* Bulk insert, Bulk delete, Bulk read :fire:
* Relations - automatically detected
* Aggregate functions
* More
* Upload single file
* Upload multiple files
* Download file
* Authentication
* Access Control
## API Overview
### Query
| **Resolver** | **Arguments** | **Returns** | **Description** |
|---|---|---|---|
| [TableName**List**](#tablenamelist) | where: String, limit: Int, offset: Int, sort: String | [TableName] | List of table rows |
| [TableName**Read**](#tablenameread) | id:String | TableName | Get row by primary key |
| [TableName**Exists**](#tablenameexists) | id: String | Boolean | Check row exists by primary key |
| [TableName**FindOne**](#tablenamefindone) | where: String | TableName | Find row by where conditions |
| [TableName**Count**](#tablenamecount) | where: String | Int | Get rows count |
| [TableName**Distinct**](#tablenamedistinct) | columnName: String, where: String, limit: Int, offset: Int, sort: String | [TableName] | Get distinct rows based on provided column names |
| [TableName**GroupBy**](#tablenamegroupby) | fields: String, having: String, limit: Int, offset: Int, sort: String | [TableNameGroupBy] | Group rows by provided columns |
| [TableName**Aggregate**](#tablenameaggregate) | columnName: String!, having: String, limit: Int, offset: Int, sort: String, func: String! | [TableNameAggregate] | Do aggregation based on provided column name aggregate function |
| [TableName**Distribution**](#tablenamedistribution) | min: Int, max: Int, step: Int, steps: String, columnName: String! | [distribution] | Get distributed list |
### Mutations
| **Resolver** | **Arguments** | **Returns** | **Description** |
|---|---|---|---|
| [TableName**Create**](#tablenamecreate) | data:TableNameInput | TableName | Insert row into table |
| [TableName**Update**](#tablenameupdate) | id:String,data:TableNameInput | TableName | Update table row using primary key |
| [TableName**Delete**](#tablenamedelete) | id:String | TableName | Delete table row using primary id |
| [TableName**CreateBulk**](#tabelenamecreatebulk) | data: [TableNameInput] | [Int] | Bulk row insert |
| [TableName**UpdateBulk**](#tablenamebulk) | data: [TableNameInput] | [Int] | Bulk row update |
| [TableName**DeleteBulk**](#tablenamedeletebulk) | data: [TableNameInput] | [Int] | Bulk row delete |
### Query params
| **Param** | **Description** | **Default value** |**Example Value**|
|---|---|---|---|
| where | Logical Expression | | `(colName,eq,colValue)~or(colName2,gt,colValue2)` <br />[Usage: Comparison operators](#comparison-operators) <br />[Usage: Logical operators](#logical-operators) |
| limit | Number of rows to get(SQL limit value) | 10 | 20 |
| offset | Offset for pagination(SQL offset value) | 0 | 20 |
| sort | Sort column name, where use `-` as prefix for descending sort | | column_name |
| fields | Required column names in result | * | column_name_1,column_name_2 |
#### Comparison operators
```
eq - '=' - (colName,eq,colValue)
not - '!=' - (colName,not,colValue)
gt - '>' - (colName,gt,colValue)
ge - '>=' - (colName,ge,colValue)
lt - '<' - (colName,lt,colValue)
le - '<=' - (colName,le,colValue)
is - 'is' - (colName,is,true/false/null)
isnot - 'is not' - (colName,isnot,true/false/null)
in - 'in' - (colName,in,val1,val2,val3,val4)
btw - 'between' - (colName,btw,val1,val2)
nbtw - 'not between'- (colName,nbtw,val1,val2)
like - 'like' - (colName,like,%name)
```
#### Example use of comparison operators - complex example
```
PaymentList(where:"(checkNumber,eq,JM555205)~or((amount,gt,200)~and(amount,lt,2000))")
```
#### Logical operators
```
~or - 'or'
~and - 'and'
~not - 'not'
```
## Examples
### TableNameList
<code-group>
<code-block label="Request" active>
```
CountryList {
country_id
country
last_update
}
```
</code-block>
<code-block label="Response">
```json
{
"data": {
"CountryList": [
{
"country_id": 1,
"country": "Afghanistan",
"last_update": "1139978640000",
"CityCount": 1
},
{
"country_id": 2,
"country": "Algeria",
"last_update": "1139978640000",
"CityCount": 3
},
{
"country_id": 3,
"country": "American Samoa",
"last_update": "1139978640000",
"CityCount": 1
}
]
}
}
```
</code-block>
</code-group>
#### List + where
<code-group>
<code-block label="Request" active>
```
{
CountryList(where:"(country,like,United%)") {
country_id
country
last_update
CityCount
}
}
```
</code-block>
<code-block label="Response">
```json
{
"data": {
"CountryList": [
{
"country_id": 101,
"country": "United Arab Emirates",
"last_update": "1139958840000",
"CityCount": 3
},
{
"country_id": 102,
"country": "United Kingdom",
"last_update": "1139958840000",
"CityCount": 8
},
{
"country_id": 103,
"country": "United States",
"last_update": "1139958840000",
"CityCount": 35
}
]
}
}
```
</code-block>
</code-group>
[Usage : comparison operators](#comparison-operators)
#### List + where + sort
<code-group>
<code-block label="Request" active>
```
{
CountryList(where:"(country,like,United%)",sort:"-country") {
country_id
country
last_update
CityCount
}
}
```
</code-block>
<code-block label="Response">
```json
{
"data": {
"CountryList": [
{
"country_id": 103,
"country": "United States",
"last_update": "1139958840000",
"CityCount": 35
},
{
"country_id": 102,
"country": "United Kingdom",
"last_update": "1139958840000",
"CityCount": 8
},
{
"country_id": 101,
"country": "United Arab Emirates",
"last_update": "1139958840000",
"CityCount": 3
}
]
}
}
```
</code-block>
</code-group>
#### List + where + sort + offset
<code-group>
<code-block label="Request" active>
```
{
CountryList(where:"(country,like,United%)",sort:"-country",offset:1) {
country_id
country
last_update
CityCount
}
}
```
</code-block>
<code-block label="Response">
```json
{
"data": {
"CountryList": [
{
"country_id": 102,
"country": "United Kingdom",
"last_update": "1139958840000",
"CityCount": 8
},
{
"country_id": 101,
"country": "United Arab Emirates",
"last_update": "1139958840000",
"CityCount": 3
}
]
}
}
```
</code-block>
</code-group>
#### List + limit
<code-group>
<code-block label="Request" active>
```
{
CountryList(limit:6) {
country
}
}
```
</code-block>
<code-block label="Response">
```json
{
"data": {
"CountryList": [
{
"country": "Afghanistan"
},
{
"country": "Algeria"
},
{
"country": "American Samoa"
},
{
"country": "Angola"
},
{
"country": "Anguilla"
},
{
"country": "Argentina"
}
]
}
}
```
</code-block>
</code-group>
[](#query)
### TableNameRead
<code-group>
<code-block label="Request" active>
```
CountryRead(id:"1") {
country_id
country
last_update
}
```
</code-block>
<code-block label="Response">
```json
"data": {
"CountryRead": {
"country_id": 1,
"country": "Afghanistan",
"last_update": "1139978640000",
"CityCount": 1
}
}
```
</code-block>
</code-group>
[](#query)
### TableNameExists
<code-group>
<code-block label="Request" active>
```
CountryExists(id:"1")
```
</code-block>
<code-block label="Response">
```json
"data": {
"CountryExists": true
}
```
</code-block>
</code-group>
[](#query)
### TableNameFindOne
<code-group>
<code-block label="Request" active>
```
CountryFindOne(where:"(country_id,eq,1)") {
country_id
country
last_update
CityCount
}
```
</code-block>
<code-block label="Response">
```json
"data": {
"CountryFindOne": {
"country_id": 1,
"country": "Afghanistan",
"last_update": "1139978640000",
"CityCount": 1
}
}
```
</code-block>
</code-group>
[](#query)
### TableNameCount
<code-group>
<code-block label="Request" active>
```
CountryCount
```
</code-block>
<code-block label="Response">
```json
{
"data": {
"CountryCount": 109
}
}
```
</code-block>
</code-group>
[](#query)
### TableNameDistinct
<code-group>
<code-block label="Request" active>
```
{
CountryDistinct(columnName:"last_update",limit:3) {
last_update
}
}
```
</code-block>
<code-block label="Response">
```json
{
"data": {
"CountryDistinct": [
{
"last_update": "1139958840000"
},
{
"last_update": "1578323893000"
},
{
"last_update": "1578321201000"
}
]
}
}
```
</code-block>
</code-group>
[](#query)
### TableNameGroupBy
<code-group>
<code-block label="Request" active>
```
{
CountryGroupBy(fields:"last_update",limit:1) {
country_id
country
last_update
count
}
}
```
</code-block>
<code-block label="Response">
```json
{
"data": {
"CountryGroupBy": [
{
"country_id": null,
"country": null,
"last_update": "1139958840000",
"count": 109
}
]
}
}
```
</code-block>
</code-group>
[](#query)
### TableNameAggregate
<code-group>
<code-block label="Request" active>
```
{
PaymentAggregate(columnName:"amount",func:"min,max,avg,count") {
count
avg
min
}
}
```
</code-block>
<code-block label="Response">
```json
{
"data": {
"PaymentAggregate": [
{
"count": 16048,
"avg": 4.200743,
"min": 0
}
]
}
}
```
[](#query)
### TableNameDistribution
<code-group>
<code-block label="Request" active>
```
{
PaymentDistribution (columnName:"amount"){
range
count
}
}
```
</code-block>
<code-block label="Response">
```json
{
"data": {
"PaymentDistribution": [
{
"range": "0-4",
"count": 8302
},
{
"range": "5-8",
"count": 3100
},
{
"range": "9-11.99",
"count": 371
}
]
}
}
```
</code-block>
</code-group>
[](#mutations)
### TableNameCreate
<code-group>
<code-block label="Request" active>
```
mutation {
CountryCreate(data: {country: "test"}) {
country_id
country
last_update
CityCount
}
}
```
</code-block>
<code-block label="Response">
```json
{
"data": {
"CountryCreate": {
"country_id": 10264,
"country": "test",
"last_update": null,
"CityCount": 0
}
}
}
```
</code-block>
</code-group>
[](#mutations)
### TableNameUpdate
<code-group>
<code-block label="Request" active>
```
mutation {
CountryUpdate(data: {country: "test_new"}, id: "10264") {
country_id
country
last_update
CityCount
}
}
```
</code-block>
<code-block label="Response">
```json
{
"data": {
"CountryUpdate": {
"country_id": null,
"country": null,
"last_update": null,
"CityCount": null
}
}
}
```
</code-block>
</code-group>
[](#mutations)
### TableNameDelete
<code-group>
<code-block label="Request" active>
```
mutation {
CountryDelete(id: "10264") {
country_id
country
last_update
CityCount
}
}
```
</code-block>
<code-block label="Response">
```json
{
"data": {
"CountryDelete": {
"country_id": null,
"country": null,
"last_update": null,
"CityCount": null
}
}
}
```
</code-block>
</code-group>
[](#mutations)
### TableNameCreateBulk
<code-group>
<code-block label="Request" active>
```
mutation {
CountryCreateBulk(data:[{country:"test 2"},{country:"test 3"}])
}
```
</code-block>
<code-block label="Response">
```json
{
"data": {
"CountryCreateBulk": [
10265
]
}
}
```
</code-block>
</code-group>
[](#mutations)
### TableNameUpdateBulk
<code-group>
<code-block label="Request" active>
```
mutation {
CountryUpdateBulk(data: [{country: "test 2", country_id: 10265}, {country: "test 3", country_id: 10266}])
}
```
</code-block>
<code-block label="Response">
```json
{
"data": {
"CountryUpdateBulk": [
1,
1
]
}
}
```
</code-block>
</code-group>
[](#mutations)
### TableNameDeleteBulk
<code-group>
<code-block label="Request" active>
```
mutation {
CountryDeleteBulk(data: [{country_id: 10265}, {country_id: 10266}])
}
```
</code-block>
<code-block label="Response">
```json
{
"data": {
"CountryDeleteBulk": [
1,
1
]
}
}
```
</code-block>
</code-group>

1208
packages/noco-docs-prev/content/en/developer-resources/rest-apis.md

File diff suppressed because it is too large Load Diff

185
packages/noco-docs-prev/content/en/developer-resources/webhooks.md

@ -1,185 +0,0 @@
---
title: "Webhooks"
description: "Webhooks"
position: 1030
category: "Developer Resources"
menuTitle: "Webhooks"
---
<announcement></announcement>
## Triggers
Webhooks allows user to trigger on certain operations on following database operations
- AFTER INSERT
- AFTER UPDATE
- AFTER DELETE
The triggers will trigger asynchronously without blocking the actual operation.
### Applications/services
| Trigger | Details |
| --------------- | ---------------------------------------------- |
| Email | Send email to certain email addresses |
| Slack | Notify via Slack channel |
| Microsoft Teams | Notify via Microsoft Teams channel |
| Discord | Notify via Discord channel |
| Mattermost | Notify via Mattermost channel |
| Twilio | Send SMS to certain mobile numbers |
| Whatsapp Twilio | Send Whatsapp messages to numbers using Twilio |
| URL | Invoke an HTTP API |
## Accessing Data: Handlebars
The current row data and other details will be available in the hooks payload so the user can use [handlebar syntax](https://handlebarsjs.com/guide/#simple-expressions) to use data.
> We are using [Handlebars](https://handlebarsjs.com/) library to parse the payload internally.
### Example
For a table with column names (id, title, created_at, updated_at).
For INSERT/ UPDATE based triggers, use following handlebars to access corresponding **data** fields.
- {{ **data**.id }}
- {{ **data**.title }}
- {{ **data**.created_at }}
- {{ **data**.updated_at }}
Note that, for Update trigger - all the fields in the ROW will be accessible, not just the field updated.
For DELETE based triggers, **only** {{ data.id }} is accessible representing ID of the column deleted.
For all trigger, following **user** information associated with person trigger can be accessed.
- {{ **user**.id }} : Unique auto incremented NocoDB system value
- {{ **user**.email }} : User E-mail.
- {{ **user**.roles }} : User Role amongst [Owner, Creator, Editor, Commenter, Viewer].
### JSON format
Use {{ json data }} {{ json user }} to dump complete data & user information available in JSON format
### Additional references:
[Handlebar Guide](https://handlebarsjs.com/guide/).
# Application Guide
## Discord
### 1. Create WebHook
- On Discord, open your Server Settings and head into the Integrations tab:
- Click the "Create Webhook" button to create a new webhook!
![Screenshot 2022-02-22 at 1 21 59 PM](https://user-images.githubusercontent.com/86527202/155087088-8f9fd762-9ff9-41a6-aed4-0f22add77fe6.png)
- Choose channel to which this webhook will post to.
- Copy webhook URL
![Screenshot 2022-02-22 at 1 23 18 PM](https://user-images.githubusercontent.com/86527202/155087126-c2cdd7b2-518a-46a5-82a5-aa90fe51a709.png)
(Sample webhook URL: https://discord.com/api/webhooks/945558283756908644/GNUtiGuzfOky6wZ4ce30XuXc1sbPK3Od7EC-4t6hihh5Fovv6oU9OsdT6mGuoL1QlTzj).
Detailed procedure for discord webhook described [here](https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks).
### 2. Install Plugin
- Open 'App Store' (under Settings), hover over Discord tile. Click 'Install'.
![Screenshot 2022-02-22 at 11 30 36 AM](https://user-images.githubusercontent.com/86527202/155085257-5bdde1d9-d7b5-471d-bf44-3c3920e7b853.png)
- Provide a name of your choice (not to be confused with Discord Channel name).
- Paste Discord Webhook URL copied from Step (1.) above.
![Screenshot 2022-02-22 at 11 31 21 AM](https://user-images.githubusercontent.com/86527202/155085287-f5e45aab-fd33-4138-a7a9-6eddc6dc140b.png)
### 3. Configure
- Open project, associated table.
- Click 'More' > 'Webhooks'.
![Screenshot 2022-02-22 at 11 16 18 AM](https://user-images.githubusercontent.com/86527202/155085373-f9b438ed-98c3-4fb1-9209-1bb52736a35d.png)
- Click 'Add New Webhook'
![Screenshot 2022-02-22 at 11 18 04 AM](https://user-images.githubusercontent.com/86527202/155085629-2c4260c6-6d0c-490d-bd6e-092cbb9faeb5.png)
- Configure
- **Title**: Name of your choice to identify this Webhook.
- **Event**: Trigger event. Choose between.
- After Insert: Trigger event for new ROW insertion.
- After Update: Trigger event for existing ROW updation.
- After Delete: Trigger event for ROW deletion
- **On Condition**: [Optional] Enable if you wish to associate additional condition/constraint with the trigger configured above.
- **Notification**: Select 'Discord'.
- **Select Discord Channels**: Select from the drop down list, channel name configured in Step (2). Please click on 'Reload' if drop down list is empty.
- **Body**: Message to be posted over Discord channel, via webhooks on trigger of configured event.
- Body can contain plain text &
- Handlebars {{ }}
## Slack
### 1. Create WebHook
- Details to create slack webhook are captured [here](https://api.slack.com/messaging/webhooks)
### 2. Install Plugin
- Procedure remain same as listed for DISCORD channel configuration above
### 3. Configure Webhook
- Procedure remain same as listed for DISCORD channel configuration above
## Microsoft Teams
### 1. Create WebHook
- On Teams, open your channel, click on three-dots menu (far right) and select 'Connectors'
<img width="319" alt="154971352-6912d53b-cf71-4edd-a319-1c85be85f0c5" src="https://user-images.githubusercontent.com/86527202/155095745-91abd708-834f-4f0e-a33c-ac362e60af0f.png">
- Select incoming webhook & click 'Configure'
<img width="442" alt="154971434-0ced97f7-205a-4e2e-8f88-17092cb7771a" src="https://user-images.githubusercontent.com/86527202/155095741-b23ad6b2-1276-46e3-8ada-0d0a871115bb.png">
- Create webhook, Copy webhook URL
![154971683-db16be7f-4f07-4447-8f2e-ac50e133bef8](https://user-images.githubusercontent.com/86527202/155095733-c339a914-5d78-408c-8f1e-9cd75a7783e8.png)
### 2. Install Plugin
- Open 'App Store' (under Settings), hover over 'Microsoft Teams' tile. Click 'Install'.
![Screenshot 2022-02-22 at 7 32 52 PM](https://user-images.githubusercontent.com/86527202/155148122-60844b42-7d2a-4c0f-9778-a5bc4f9c0107.png)
- Provide a name of your choice (not to be confused with Teams Channel name).
- Paste MS Teams Webhook URL copied from Step (1.) above.
<img width="414" alt="154971222-7fe2c25a-d8c6-46b0-ba1e-a05ff1cf6537" src="https://user-images.githubusercontent.com/86527202/155095720-ff1c052c-a4a7-4c10-8f30-d779dac336f3.png">
### 3. Configure
- Open project, associated table.
- Click 'More' > 'Webhooks'.
![Screenshot 2022-02-22 at 11 16 18 AM](https://user-images.githubusercontent.com/86527202/155085373-f9b438ed-98c3-4fb1-9209-1bb52736a35d.png)
- Click 'Add New Webhook'
![Screenshot 2022-02-22 at 11 18 04 AM](https://user-images.githubusercontent.com/86527202/155085629-2c4260c6-6d0c-490d-bd6e-092cbb9faeb5.png)
- Configure
- **Title**: Name of your choice to identify this Webhook.
- **Event**: Trigger event. Choose between.
- After Insert: Trigger event for new ROW insertion.
- After Update: Trigger event for existing ROW updation.
- After Delete: Trigger event for ROW deletion
- **On Condition**: [Optional] Enable if you wish to associate additional condition/constraint with the trigger configured above.
- **Notification**: Select 'Microsoft Teams'.
- **Select Teams Channels**: Select from the drop down list, channel name configured in Step (2). Please click on 'Reload' if drop down list is empty.
- **Body**: Message to be posted over Teams channel, via webhooks on trigger of configured event.
- Body can contain plain text &
- Handlebars {{ }}

63
packages/noco-docs-prev/content/en/engineering/publish.md

@ -1,63 +0,0 @@
---
title: "Making a release"
description: "Making a release"
position: 2000
category: "Engineering"
menuTitle: "Making a release"
---
<announcement></announcement>
<alert>
This is exclusive to NocoDB team members only.
</alert>
<alert types='danger'>
The version 0.84.8 will be used as an example. Please change it during the release.
</alert>
## 1. Merge ```develop``` to ```master```
- When several features are included in ``develop`` branch and they are ready to be released, make a PR with the title ``0.84.8 Pre-Release`` from `develop` branch to `master` branch. At least one NocoDB team member approval is required.
## 2. Publish frontend
- Navigate to `packages/nc-gui` and execute following command.
```bash
npm run build:copy:jsdeliver
```
## 3. Install frontend
- Install the latest published version of `nc-lib-gui` in `packages/nocodb`, package version can be extracted from result of step 1 or copy it from `packages/nc-lib-gui/package.json`. While installing, add `-E` to install exact version of the package.
- Example: for latest published version `0.84.8`
```bash
npm i -E nc-lib-gui@0.84.8
```
## 4. Publish backend
- Bump package version in `packages/nocodb/package.json` file.
- Publish the npm package by running following npm command in `packages/nocodb` folder.
```
npm run obfuscate:build:publish
```
## 5. Close all issues
- Go to Issue page and close all issues with tags ``Fixed`` or ``Resolved``.
## 6. Commit release changes
- Commit those changes made by previous steps with the commit message ``chore(publish): v0.84.8``.
## 7. Prepare release notes
- Populate release note by running following github action (on `master` branch) - `Release : Draft Notes`. While running the action you have to provide 2 inputs:
- **Tag** : Provide current package version
- **Previous Tag** : Provide previously released tag version
## 8. Publish docker & release
- Publish docker image by running `Release : Docker` action in github (on `master` branch), where you have to provide the package version/tag. It may take half an hour. Test it locally after it is done.
- Update the populated release (remove issues which is not related to release) draft and publish. In release note you can use `Auto-generate release notes` button to populate release content from commits & PR.
## 9. Sync the changes back to develop branch
- Pull the latest chagnes for both branches to your local
- Switch to ``develop`` branch
- Run ``git merge master``
- Push the diff to remote repository

67
packages/noco-docs-prev/content/en/engineering/translation.md

@ -1,67 +0,0 @@
---
title: "i18n"
description: "Contribute to NocoDB's i18n translation"
position: 2000
category: "Engineering"
menuTitle: "i18n"
---
<announcement></announcement>
NocoDB supports many foreign languages & we welcome community contributions via an easy to use [google-spreadsheet](https://docs.google.com/spreadsheets/d/1kGp92yLwhs1l7lwwgeor3oN1dFl7JZWuQOa4WSeZ0TE/edit#gid=2076107172).
Your help in fixing i18n goes a long way supporting NocoDB. Please follow below simple procedure to request corrections to existing translation errors.
## How to contribute ? (for community members)
### 1. How to change a string value ?
- Make a copy of [Google spreadsheet](https://docs.google.com/spreadsheets/d/1kGp92yLwhs1l7lwwgeor3oN1dFl7JZWuQOa4WSeZ0TE/edit#gid=2076107172)
<img width="995" alt="Screenshot 2022-02-10 at 1 47 06 PM" src="https://user-images.githubusercontent.com/86527202/153368423-d1d898ef-bdcb-48c4-a772-b75e2c66566d.png">
- Find your language code [here](https://developers.google.com/admin-sdk/directory/v1/languages)
- Go to the column containing your language code. Make necessary changes. Origin text in ENGLISH can be found in `Column B` of master spreadsheet.
- Create a new [issue in Github](https://github.com/nocodb/nocodb/issues/new?assignees=dstala&labels=i18n+translation&template=i18n-translation-request.md&title=%5Bi18n%5D+Language+support+extension-+%3Clanguage+code%3E) request with a link to your spreadsheet from Step-1 (for us to verify & update master spreadsheet).
- NocoDB Maintainers will take changes and merge it.
- It's that simple!
### 2. How to add a new language ?
Your native language not in list, we will be glad to support with your help! Please follow below steps
- Make a copy of [Google spreadsheet](https://docs.google.com/spreadsheets/d/1kGp92yLwhs1l7lwwgeor3oN1dFl7JZWuQOa4WSeZ0TE/edit#gid=2076107172)
<img width="995" alt="Screenshot 2022-02-10 at 1 47 06 PM" src="https://user-images.githubusercontent.com/86527202/153368423-d1d898ef-bdcb-48c4-a772-b75e2c66566d.png">
- Find your language code [here](https://developers.google.com/admin-sdk/directory/v1/languages)
- Replace cell $AB$1 (rightmost, containing text `en`) with language code obtained above.
- Google will generate first version translation in column AB. Review. Make changes as you find appropriate for various items listed. Origin text in ENGLISH can be found in `Column B` of master spreadsheet.
- Create new [issue](https://github.com/nocodb/nocodb/issues/new?assignees=dstala&labels=i18n+translation&template=i18n-translation-request.md&title=%5Bi18n%5D+Language+support+extension-+%3Clanguage+code%3E) request with a link to your spreadsheet from Step-1 (for us to verify & update master spreadsheet).
---
## How to accept i18n contributions ? (for NocoDB maintainers)
> _This is exclusive to NocoDB maintainers only_
### 1. Adding / Updating a string
- Open master [Spreadsheet](https://docs.google.com/spreadsheets/d/1kGp92yLwhs1l7lwwgeor3oN1dFl7JZWuQOa4WSeZ0TE/edit#gid=2076107172)
- For the string/ text under consideration, look-up in existing sheet if it exists already
- [New string already exists] Consider re-using it; align string key if required
- [New string need to be inserted] Insert a new record into appropriate categories as defined below
- Download spreadsheet as .csv (File > Download > Comma-seperated values (.csv, current sheet)
- Use noco-i18n-from-cli to generate new language JSON file
- Copy respective i18n/\*.json files to `nocodb/packages/nc-gui/lang`
### 2. String Categories
- **General**: simple & common tokens (save, cancel, submit, open, close, home, and such)
- **Objects**: objects from NocoDB POV (project, table, field, column, view, page, and such)
- **Title**: screen headers (compact) (menu headers, modal headers)
- **Lables**: text box/ radio/ field headers (few words) (Labels over textbox, radio buttons, and such)
- **Activity**/ actions: work items (few words) (Create Project, Delete Table, Add Row, and such)
- **Tooltip**: additional information associated with work items (usually lengthy) (Additional information provided for activity)
- **Placeholder**: placeholders associated with various textboxes (Text placeholders)
- **Msg**
- Info: general/success category for everything
- Error: warnings & errors
- Toast: pop-up toast messages
> Note: string name should be in camelCase. Use above list as priority order in case of ambiguity.

14
packages/noco-docs-prev/content/en/getting-started/demos.md

@ -1,14 +0,0 @@
---
title: 'Demos'
description: 'Demos'
position: 30
category: 'Getting started'
fullscreen: true
menuTitle: 'Demos'
---
<announcement></announcement>
Demos are loading from https://nocodb.com (please wait)
<iframe src="https://nocodb.com/demos" style="height:100vh" width="100%"/>

324
packages/noco-docs-prev/content/en/getting-started/installation.md

@ -1,324 +0,0 @@
---
title: 'Installation'
description: 'Simple installation - takes about three minutes!'
position: 10
category: 'Getting started'
menuTitle: 'Installation'
link: https://codesandbox.io/embed/vigorous-firefly-80kq5?hidenavigation=1&theme=dark
---
<announcement></announcement>
Simple installation - takes about three minutes!
## Prerequisites
- __Must haves__
* [node.js >= 12](https://nodejs.org/en/download) / [Docker](https://www.docker.com/get-started)
* [MySql](https://dev.mysql.com/downloads/mysql/) / [Postgres](https://www.postgresql.org/download/) / [SQLserver](https://www.microsoft.com/en-gb/sql-server/sql-server-downloads) / SQLite Database
- Nice to haves
- Existing schemas can help to create APIs quickly.
- An example database schema can be found <a class="grey--text" href="https://github.com/lerocha/chinook-database/tree/master/ChinookDatabase/DataSources"> <u>here</u></a>.
## Quick try
### 1-Click Deploy to Heroku
<a href="https://heroku.com/deploy?template=https://github.com/nocodb/nocodb-seed-heroku">
<img
src="https://www.herokucdn.com/deploy/button.svg"
width="300px"
alt="Deploy NocoDB to Heroku with 1-Click"
/>
</a>
### Node app / Docker
<code-group>
<code-block label="NPX" active>
```bash
npx create-nocodb-app
```
</code-block>
<code-block label="Docker" >
```bash
docker run -d --name nocodb -p 8080:8080 nocodb/nocodb:latest
```
</code-block>
<code-block label="Using Git" >
```bash
git clone https://github.com/nocodb/nocodb-seed
cd nocodb-seed
npm install
npm start
```
</code-block>
</code-group>
> To persist data in docker you can mount volume at `/usr/app/data/` since 0.10.6. In older version mount at `/usr/src/app`.
## Production Setup
NocoDB requires a database to store metadata of spreadsheets views and external databases.
And connection params for this database can be specified in `NC_DB` environment variable.
### Docker
<code-group>
<code-block label="MySQL" active>
```bash
docker run -d -p 8080:8080 \
-e NC_DB="mysql2://host.docker.internal:3306?u=root&p=password&d=d1" \
-e NC_AUTH_JWT_SECRET="569a1821-0a93-45e8-87ab-eb857f20a010" \
nocodb/nocodb:latest
```
</code-block>
<code-block label="Postgres">
```bash
docker run -d -p 8080:8080 \
-e NC_DB="pg://host:port?u=user&p=password&d=database" \
-e NC_AUTH_JWT_SECRET="569a1821-0a93-45e8-87ab-eb857f20a010" \
nocodb/nocodb:latest
```
</code-block>
<code-block label="SQL Server">
```bash
docker run -d -p 8080:8080 \
-e NC_DB="mssql://host:port?u=user&p=password&d=database" \
-e NC_AUTH_JWT_SECRET="569a1821-0a93-45e8-87ab-eb857f20a010" \
nocodb/nocodb:latest
```
</code-block>
</code-group>
<alert>
If you plan to input some special characters, you may need to change the character set and collation yourself when creating the database. Please check out the examples for <a href="https://github.com/nocodb/nocodb/issues/1340#issuecomment-1049481043" target="_blank">MySQL Docker</a> and <a href="https://github.com/nocodb/nocodb/issues/1313#issuecomment-1046625974" target="_blank">MySQL Docker Compose</a>.
</alert>
### Environment variables
| Variable | Mandatory | Comments | If absent |
|-------------------------|-----------|----------------------------------------------------------------------------------|--------------------------------------------|
| NC_DB | Yes | See our database URLs | A local SQLite will be created in root folder |
| NC_DB_JSON | Yes | Can be used instead of `NC_DB` and value should be valid knex connection JSON | |
| NC_DB_JSON_FILE | Yes | Can be used instead of `NC_DB` and value should be a valid path to knex connection JSON | |
| DATABASE_URL | No | JDBC URL Format. Can be used instead of NC_DB. Used in 1-Click Heroku deployment| |
| DATABASE_URL_FILE | No | path to file containing JDBC URL Format. Can be used instead of NC_DB. Used in 1-Click Heroku deployment| |
| NC_DASHBOARD_URL | No | Custom dashboard url path | `/dashboard` |
| NC_TOOL_DIR | No | App directory to keep metadata and app related files | Defaults to current working directory. In docker maps to `/usr/app/data/` for mounting volume. |
| NC_PUBLIC_URL | Yes | Used for sending Email invitations | Best guess from http request params |
| NC_AUTH_JWT_SECRET | Yes | JWT secret used for auth and storing other secrets | A Random secret will be generated |
| NC_JWT_EXPIRES_IN | No | JWT token expiry time | `10h` |
| NC_CONNECT_TO_EXTERNAL_DB_DISABLED | No | Disable Project creation with external database | |
| NC_INVITE_ONLY_SIGNUP | No | Allow users to signup only via invite url, value should be any non-empty string. | |
| NC_BACKEND_URL | No | Custom Backend URL | ``http://localhost:8080`` will be used |
| NC_REQUEST_BODY_SIZE | No | Request body size [limit](https://expressjs.com/en/resources/middleware/body-parser.html#limit) | `1048576` |
| NC_EXPORT_MAX_TIMEOUT | No | After NC_EXPORT_MAX_TIMEOUT csv gets downloaded in batches | Default value 5000(in millisecond) will be used |
| DB_QUERY_LIMIT_DEFAULT | No | Default pagination limit | 25 |
| DB_QUERY_LIMIT_MAX | No | Maximum allowed pagination limit | 100 |
| DB_QUERY_LIMIT_MIN | No | Minimum allowed pagination limit | 1 |
| NC_DISABLE_TELE | No | Disable telemetry | |
| NC_GOOGLE_CLIENT_ID | No | Google client id to enable google authentication | |
| NC_GOOGLE_CLIENT_SECRET | No | Google client secret to enable google authentication | |
| NC_MIGRATIONS_DISABLED | No | Disable NocoDB migration | |
| NC_ONE_CLICK | No | Used for Heroku one-click deployment | |
| NC_MIN | No | If set to any non-empty string the default splash screen(initial welcome animation) and matrix screensaver will disable | |
| PORT | No | For setting app running port | `8080` |
| NC_SENTRY_DSN | No | For Sentry monitoring | |
| NC_DISABLE_ERR_REPORT | No | Disable error reporting | |
### Docker Compose
<code-group>
<code-block label="MySQL" active>
```bash
git clone https://github.com/nocodb/nocodb
cd nocodb
cd docker-compose
cd mysql
docker-compose up -d
```
</code-block>
<code-block label="Postgres">
```bash
git clone https://github.com/nocodb/nocodb
cd nocodb
cd docker-compose
cd pg
docker-compose up -d
```
</code-block>
<code-block label="SQL Server">
```bash
git clone https://github.com/nocodb/nocodb
cd nocodb
cd docker-compose
cd mssql
docker-compose up -d
```
</code-block>
</code-group>
### AWS ECS (Fargate)
#### Create ECS Cluster
```
aws ecs create-cluster \
--cluster-name <YOUR_ECS_CLUSTER>
```
#### Create Log group
```
aws logs create-log-group \
--log-group-name /ecs/<YOUR_APP_NAME>/<YOUR_CONTAINER_NAME>
```
#### Create ECS Task Definiton
Every time you create it, it will add a new version. If it is not existing, the version will be 1.
```bash
aws ecs register-task-definition \
--cli-input-json "file://./<YOUR_TASK_DEF_NAME>.json"
```
<alert>
This json file defines the container specification. You can define secrets such as NC_DB and environment variables here.
</alert>
Here's the sample Task Definition
```json
{
"family": "nocodb-sample-task-def",
"networkMode": "awsvpc",
"containerDefinitions": [{
"name": "<YOUR_CONTAINER_NAME>",
"image": "nocodb/nocodb:latest",
"essential": true,
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "/ecs/<YOUR_APP_NAME>/<YOUR_CONTAINER_NAME>",
"awslogs-region": "<YOUR_AWS_REGION>",
"awslogs-stream-prefix": "ecs"
}
},
"secrets": [{
"name": "<YOUR_SECRETS_NAME>",
"valueFrom": "<YOUR_SECRET_ARN>"
}],
"environment": [{
"name": "<YOUR_ENV_VARIABLE_NAME>",
"value": "<YOUR_ENV_VARIABLE_VALUE>"
}],
"portMappings": [{
"containerPort": 8080,
"hostPort": 8080,
"protocol": "tcp"
}]
}],
"requiresCompatibilities": [
"FARGATE"
],
"cpu": "256",
"memory": "512",
"executionRoleArn": "<YOUR_ECS_EXECUTION_ROLE_ARN>",
"taskRoleArn": "<YOUR_ECS_TASK_ROLE_ARN>"
}
```
#### Create ECS Service
```bash
aws ecs create-service \
--cluster <YOUR_ECS_CLUSTER> \
--service-name <YOUR_SERVICE_NAME> \
--task-definition <YOUR_TASK_DEF>:<YOUR_TASK_DEF_VERSION> \
--desired-count <DESIRED_COUNT> \
--launch-type "FARGATE" \
--platform-version <VERSION> \
--health-check-grace-period-seconds <GRACE_PERIOD_IN_SECOND> \
--network-configuration "awsvpcConfiguration={subnets=["<YOUR_SUBSETS>"], securityGroups=["<YOUR_SECURITY_GROUPS>"], assignPublicIp=ENABLED}" \
--load-balancer targetGroupArn=<TARGET_GROUP_ARN>,containerName=<CONTAINER_NAME>,containerPort=<YOUR_CONTAINER_PORT>
```
<alert>
If your service fails to start, you may check the logs in ECS console or in Cloudwatch. Generally it fails due to the connection between ECS container and NC_DB. Make sure the security groups have the correct inbound and outbound rules.
</alert>
## Development Setup
If you want to modify the source code,
- Start the backend locally
```bash
cd packages/nocodb
npm install
npm run watch:run
```
- Start the frontend locally
```bash
cd packages/nc-gui
npm install
npm run dev
```
- Open ``localhost:3000/dashboard`` in browser
<alert>
nocodb/packages/nocodb includes nc-lib-gui which is the built version of nc-gui hosted in npm registry. <br>
You can visit localhost:8000/dashboard in browser after starting the backend locally if you just want to modify the backend only.
</alert>
## Sample Demos
### Code Sandbox
<code-sandbox :src="link"></code-sandbox>
### Docker deploying with one command
<youtube id="K-UEecQyiOk"></youtube>
### Using NPX
<youtube id="v6Nn75P1p7I"></youtube>
### Heroku Deployment
<youtube id="WB7yYXfhocY"></youtube>

96
packages/noco-docs-prev/content/en/getting-started/upgrading.md

@ -1,96 +0,0 @@
---
title: 'Upgrading'
description: 'Upgrading NocoDB : Docker, npm, Heroku!'
position: 20
category: 'Getting started'
menuTitle: 'Upgrading'
link: https://codesandbox.io/embed/vigorous-firefly-80kq5?hidenavigation=1&theme=dark
---
<announcement></announcement>
## Docker
### Find, stop & delete nocodb docker container
```
docker ps
docker stop "YOUR_CONTAINER_ID"
docker rm "YOUR_CONTAINER_ID"
```
### Find & remove nocodb docker image
```
docker images
docker rmi YOUR_IMAGE_ID
```
### Pull the latest nocodb image with same environment variables
```
docker run -d -p 8080:8080 \
-e NC_DB="YOUR_NC_DB_URL" \
-e NC_AUTH_JWT_SECRET="YOUR_NC_AUTH_JWT_SECRET_IF_GIVEN" \
nocodb/nocodb:latest
```
Updating nocodb docker container is similar to updating [any other docker container](https://www.whitesourcesoftware.com/free-developer-tools/blog/update-docker-images/).
### Example docker upgrade
![Screen Shot 2021-09-16 at 09 23 07](https://user-images.githubusercontent.com/5435402/133578984-53c6b96b-3e8b-4a96-b6c2-36f3c09ffdde.png)
## Node
Updating docker container is similar to updating a npm package.
From your root folder
#### Uninstall nocodb package
```bash
npm uninstall nocodb
```
#### Install nocodb package
```bash
npm install --save nocodb
```
## Heroku
### Using the Heroku CLI login
```
heroku container:login
docker pull nocodb/nocodb:latest
docker tag nocodb/nocodb:latest registry.heroku.com/<Heroku App Name>/web
docker push registry.heroku.com/<Heroku App Name>/web
heroku container:release -a <Heroku App Name> web
```
#### On Apple M1 Chipset
> Please make sure you change Docker's default architecture to `linux/amd64` by running the following command _before_ executing the aforementioned steps
>
> ```export DOCKER_DEFAULT_PLATFORM=linux/amd64```
>
> More details [here](https://medium.com/geekculture/from-apple-silicon-to-heroku-docker-registry-without-swearing-36a2f59b30a3).
### Using GitHub
Fork the [nocodb-seed-heroku repository](https://github.com/nocodb/nocodb-seed-heroku) to your GitHub account.
Login to Heroku, go to your NocoDB app, and head to the "Deploy" tab.
Select "GitHub" in the "Deployment method" section.
In the "Connect to GitHub" section, search for your forked nocodb-seed-heroku repo. Connect to it:
![image](https://user-images.githubusercontent.com/55474996/143479577-e8bdc1f0-99d1-4072-8d95-4879cc54ddb2.png)
In the "Automatic deploys" section, select "Enable Automatic Deploys":
![image](https://user-images.githubusercontent.com/55474996/143479705-b5280199-aa31-40db-a5aa-7586eb918c01.png)
Head back to your forked nocodb-seed-heroku repo on your GitHub account. Edit one of your files and make a simple modification (example, add some random characters to the readme.md) and commit the change directly to the main branch.
This will trigger the Heroku deployment. Your app should now be updated to the latest release of NocoDB.

88
packages/noco-docs-prev/content/en/index.md

@ -1,88 +0,0 @@
---
title: 'NocoDB Documentation (Previous Versions)'
description: 'NocoDB Documentation (Previous Versions)'
position: 0
category: 'Welcome'
menuTitle: 'Introduction'
---
<announcement></announcement>
## Welcome!
NocoDB is an open source Airtable alternative.
NocoDB works by connecting to any relational database and transforming them into a smart spreadsheet interface! This allows you to build no-code applications collaboratively with teams. NocoDB currently works with MySQL, PostgreSQL, Microsoft SQL Server, SQLite, Amazon Aurora & MariaDB databases.
Also NocoDB's app store allows you to build business workflows on views with combination of Slack, Microsoft Teams, Discord, Twilio, Whatsapp, Email & any 3rd party APIs too. Plus NocoDB provides programmatic access to APIs so that you can build integrations with Zapier / Integromat and custom applications too.
<img src="https://static.scarf.sh/a.png?x-pxid=c12a77cc-855e-4602-8a0f-614b2d0da56a" />
## Features
### Rich Spreadsheet Interface
- ⚡ &nbsp;Search, sort, filter, hide columns with uber ease
- ⚡ &nbsp;Create Views : Grid, Gallery, Kanban, Form
- ⚡ &nbsp;Share Views : public & password protected
- ⚡ &nbsp;Personal & locked Views
- ⚡ &nbsp;Upload images to cells (Works with S3, Minio, GCP, Azure, DigitalOcean, Linode, OVH, BackBlaze)!!
- ⚡ &nbsp;Roles : Owner, Creator, Editor, Commenter, Viewer, Commenter, Custom Roles.
- ⚡ &nbsp;Access Control : Fine-grained access control even at database, table & column level.
### App Store for workflow automations
- ⚡ &nbsp;Chat : Microsoft Teams, Slack, Discord, Mattermost
- ⚡ &nbsp;Email : SMTP, SES, Mailchimp
- ⚡ &nbsp;SMS : Twilio
- ⚡ &nbsp;Whatsapp
- ⚡ &nbsp;Any 3rd Party APIs
### Programmatic API access via
- ⚡ &nbsp;REST APIs (Swagger)
- ⚡ &nbsp;GraphQL APIs.
- ⚡ &nbsp;Includes JWT Authentication & Social Auth
- ⚡ &nbsp;API tokens to integrate with Zapier, Integromat.
## Why are we building this ? 🎯
Most internet businesses equip themselves with either spreadsheet or a database to solve their business needs. Spreadsheets are used by a Billion+ humans collaboratively every single day. However, we are way off working at similar speeds on databases which are way more powerful tools when it comes to computing. Attempts to solve this with SaaS offerings has meant horrible access controls, vendor lockin, data lockin, abrupt price changes & most importantly a glass ceiling on what's possible in future.
## Our Mission : ❤
Our mission is to provide the most powerful no-code interface for databases which is open source to every single internet business in the world. This would not only democratise access to a powerful computing tool but also bring forth a billion+ people who will have radical tinkering-and-building abilities on internet.
## Architecture - Simple Overview
<img src="architecture.png" style="background: white;border-radius:4px;padding :10px">
| Project Type | Metadata stored in | Data stored in |
|---------|-----------|--------|
| Create new project | NC_DB | NC_DB |
| Create new project with External Database | NC_DB | External Database |
| Create new project from Excel | NC_DB | NC_DB |
## NocoDB repository structure
We use ``Lerna`` to manage multi-packages. We have the following [packages](https://github.com/nocodb/nocodb/tree/master/packages).
- ``packages/nc-cli`` : A CLI to create NocoDB app.
- ``packages/nc-common``: A common library package used internally.
- ``packages/nc-gui``: NocoDB Frontend.
- ``packages/nc-lib-gui``: The build version of ``nc-gui`` which will be used in ``packages/nocodb``.
- ``packages/nc-plugin``: Plugin template.
- ``packages/noco-docs``: NocoDB Documentation which will be auto-released to [nocodb/noco-docs](https://github.com/nocodb/noco-docs).
- ``packages/nocodb``: NocoDB Backend, hosted in [NPM](https://www.npmjs.com/package/nocodb).
## Contributions
All contributions are welcome. NocoDB projects can be found in the [NocoDB](https://github.com/nocodb) Github organization. Our core uses [The AGPL V3 license](https://github.com/nocodb/nocodb/blob/master/LICENSE) and all contributors should read the [contribution guides](https://github.com/nocodb/nocodb/blob/master/.github/CONTRIBUTING.md) before making your first contribution.
You can also share your thoughts and discuss with our community members via [discord](https://discord.gg/5RgZmkW) or [Github Discussion](https://github.com/nocodb/nocodb/discussions). We also share our [Immediate Roadmap](https://github.com/nocodb/nocodb/projects/1) and all opinions are welcome.
## Support
If you have any issues or questions, you can reach out for help in our [discord](https://discord.gg/5RgZmkW).

19
packages/noco-docs-prev/content/en/setup-and-usages/audit.md

@ -1,19 +0,0 @@
---
title: 'Audit'
description: 'Audit log'
position: 590
category: 'Product'
menuTitle: 'Audit'
---
<announcement></announcement>
We are keeping all the user operation logs under audits, user can access the audits logs by clicking the `Audit` icon from the left navigation drawer.
![Screenshot_2021-07-23_at_7_08_22_PM](https://user-images.githubusercontent.com/61551451/126790439-14f4f60e-f125-48f8-a8a5-28f20fab71aa.png)
_Sample audit logs:_
![Pasted_Image_23_07_21__7_13_PM](https://user-images.githubusercontent.com/61551451/126790664-024f4803-c343-46ca-9b47-c3dfa0b1ad6c.png)

77
packages/noco-docs-prev/content/en/setup-and-usages/column-operations.md

@ -1,77 +0,0 @@
---
title: "Column Operations"
description: "Column Operations"
position: 530
category: "Product"
menuTitle: "Column Operations"
---
<announcement></announcement>
## Fields
<img src="https://user-images.githubusercontent.com/86527202/144435795-7156799c-04de-474d-9125-1b15e07acc3d.png" width="60%"/>
### Re-order Columns
Column positions can be re-ordered. Open `Fields` menu, and re-order fields as needed by drag/drop `drag icon`
<img src="https://user-images.githubusercontent.com/86527202/144435838-8cff72eb-eaa2-4268-9749-213283eb8336.png" width="40%"/>
#### Demo
<img src="https://github.com/dstala/nocodb-files/blob/2c4ca2ff31460ee5636262e88ba303e2d436ba54/ColumnReorder.gif" width="100%"/>
<!-- img src="https://media0.giphy.com/media/z5mYR1XoO85Umd5abh/giphy.gif?cid=790b7611f53d7e966bf9de3ae6b1cd5a7d6380b0ab8a4337&rid=giphy.gif&ct=g" width="60%"/ -->
### Hide/ Unhide Columns
To hide/Unhide columns, open `Fields` menu, tick checkbox to keep column visible, untick checkbox to remove it from view
<img src="https://user-images.githubusercontent.com/86527202/144435852-47f87057-f42f-4691-abbd-9592cde50541.png" width="40%"/>
#### Demo
<img src="https://github.com/dstala/nocodb-files/blob/2c4ca2ff31460ee5636262e88ba303e2d436ba54/ColumnHide.gif" width="100%"/>
<!-- img src="https://media2.giphy.com/media/8NXvWfHDoul72dwLhk/giphy.gif?cid=790b76116fa008b45c79bb91bfe611e324fa38cde21a255a&rid=giphy.gif&ct=g" width="60%"/ -->
## Sort
Sorting allows you to order contents alphabetically (A->Z) / (Z->A)
(OR) in ascending/ descending order
NocoDB allows nested sorting. You can choose column fields & order in which to apply nested sorting
<img src="https://user-images.githubusercontent.com/86527202/144435903-84ed8e81-64ec-45e5-a045-9a993238c78c.png" width="60%"/>
<img src="https://user-images.githubusercontent.com/86527202/144435925-67b995a0-da10-45c9-bf54-9edcc63c5644.png" width="75%"/>
#### Demo
<img src="https://github.com/dstala/nocodb-files/blob/2c4ca2ff31460ee5636262e88ba303e2d436ba54/ColumnSort-2.gif" width="100%"/>
<!-- img src="https://media4.giphy.com/media/ThQ8d42U2zdFyZGeZe/giphy.gif?cid=790b761183da2eb690295c5c25f83ace7acf5212c82569a1&rid=giphy.gif&ct=g" width="60%"/ -->
## Filter
Filters allow you to restrict/organize your data on the view as per your needs.
NocoDB allows nested filters. You can choose multiple columns and conditions to apply filter.
Between filters, you can opt for either `and` or `or` mode operation.
<img src="https://user-images.githubusercontent.com/86527202/144435944-8498be32-76cb-48d1-883a-8f674f2eb68e.png" width="60%"/>
<img src="https://user-images.githubusercontent.com/86527202/144435955-361238d5-ecda-448e-a6de-a47086aeec6e.png" width="75%"/>
### Supported filters
Each filter can be of type as described below
| Type |
|---|
| is equal |
| is not equal |
| is like |
| is not like |
| is null |
| is not null |
| > |
| < |
| >= |
| <= |
#### Demo
<img src="https://github.com/dstala/nocodb-files/blob/2c4ca2ff31460ee5636262e88ba303e2d436ba54/ColumnFilter.gif" width="100%"/>
<!-- img src="https://media4.giphy.com/media/eap5WSJfa05Qk7F3gm/giphy.gif?cid=790b761142dbc95c4f86b23a57fb0a9cb261292a88908e06&rid=giphy.gif&ct=g" width="60%"/ -->

422
packages/noco-docs-prev/content/en/setup-and-usages/column-types.md

@ -1,422 +0,0 @@
---
title: 'Column Types'
description: 'Column Types'
position: 520
category: 'Product'
menuTitle: 'Column Types'
---
<announcement></announcement>
## Available Column Types
| Type | Description |
|---|---|
| [ID](#id) | Primary column of the table |
| [LinkToAnotherRecord](#linktoanotherrecord) | Has Many or Many To Many columns |
| [ForeignKey](#foreignkey)| Belongs To relation |
| [SingleLineText](#singlelinetext) | For short text |
| [LongText](#longtext) | For lengthy string content |
| [Attachment](#attachment) | File attachment column |
| [Checkbox](#checkbox) | Boolean value |
| [MultiSelect](#multiselect) | Multiple options can be selected once |
| [SingleSelect](#singleselect) | Single option select |
| [Date](#date) | Date selector |
| [Year](#year) | Year selector |
| [Time](#time) | Time selector |
| [PhoneNumber](#phonenumber) | Phone number field |
| [Email](#email) | Email field |
| [URL](#url) | Valid URL field |
| [Number](#number) | Any type of number |
|[Decimal](#decimal)| Fractional number |
|[Currency](#currency)| Currency value |
|[Percent](#percent)| Percentage |
|[Duration](#duration)| Duration |
|[Rating](#rating)| Rating |
|[Formula](#formula)| Formula based generated column |
| [Count](#count) | |
|[DateTime](#datetime)| Date & Time selector |
|[CreateTime](#createtime)| |
|[AutoNumber](#autonumber)| |
|[Geometry](#geometry)| Geometry column |
|[SpecificDBType](#specificdbtype)| Custom DB type option |
## Database Types
### ID
#### Available Database Types
|Database| Types| Default Type|
|-----|----------|----------|
|**MySQL**|_All types are available_|int|
|**PostgreSQL**|_All types are available_|int4|
|**SQL Server**|_All types are available_|int|
|**SQLite**|_All types are available_|integer|
### LinkToAnotherRecord
### ForeignKey
### SingleLineText
#### Available Database Types
|Database| Types| Default Type|
|-----|----------|----------|
|**MySQL**|||
|**PostgreSQL**|||
|**SQL Server**|||
|**SQLite**|||
### LongText
#### Available Database Types
|Database| Types| Default Type|
|-----|----------|----------|
|**MySQL**|char, varchar, nchar, text, tinytext, mediumtext, longtext|text|
|**PostgreSQL**|char, character, character varying, text|text|
|**SQL Server**|char, ntext, text, varchar, nvarchar|text|
|**SQLite**|character, text, varchar|text|
### Attachment
#### Available Database Types
|Database| Types| Default Type|
|-----|----------|----------|
|**MySQL**|json, char, varchar, nchar, text, tinytext, mediumtext, longtext| text |
|**PostgreSQL**|json, char, character, character varying, text| text |
|**SQL Server**|char, ntext, text, varchar, nvarchar| text |
|**SQLite**|character, text, varchar|text|
### Checkbox
#### Available Database Types
|Database| Types| Default Type|
|-----|----------|----------|
|**MySQL**|int, smallint, mediumint, bigint, bit, boolean, serial, tinyint|tinyint|
|**PostgreSQL**|bit, bool, int2, int4, int8, boolean, smallint, int, integer, bigint, bigserial, char, int4range, int8range, serial, serial2, serial8|bool|
|**SQL Server**|bigint, bit, int, tinyint|tinyint|
|**SQLite**|int, integer, tinyint, smallint, mediumint, bigint, int2, int8, boolean||
### MultiSelect
#### Available Database Types
|Database| Types| Default Type|
|-----|----------|----------|
|**MySQL**|set, text, tinytext, mediumtext, longtext|set|
|**PostgreSQL**|text|text|
|**SQL Server**|text, ntext|text|
|**SQLite**|text, varchar|text|
### SingleSelect
#### Available Database Types
|Database| Types| Default Type|
|-----|----------|----------|
|**MySQL**|enum, text, tinytext, mediumtext, longtext|enum|
|**PostgreSQL**|text|
|**SQL Server**|text, ntext|text|
|**SQLite**|text, varchar|text|
### Date
#### Available Database Types
|Database| Types| Default Type|
|-----|----------|----------|
|**MySQL**|date, datetime, timestamp, varchar|varchar|
|**PostgreSQL**||character varying|
|**SQL Server**|||
|**SQLite**|date|varchar|
### Year
#### Available Database Types
|Database| Types| Default Type|
|-----|----------|----------|
|**MySQL**|year|year|
|**PostgreSQL**|int|int|
|**SQL Server**|int|int|
|**SQLite**|int, integer, tinyint, smallint, mediumint, bigint, int2, int8||
### Time
#### Available Database Types
|Database| Types| Default Type|
|-----|----------|----------|
|**MySQL**|time|time|
|**PostgreSQL**|time, time without time zone, timestamp, timestamp without time zone, timestamptz, timestamp with time zone, timetz, time with time zone|time|
|**SQL Server**|time|time|
|**SQLite**|int, integer, tinyint, smallint, mediumint, bigint, int2, int8|time|
### PhoneNumber
#### Available Database Types
|Database| Types| Default Type|
|-----|----------|----------|
|**MySQL**|varchar|varchar|
|**PostgreSQL**|character varying|character varying|
|**SQL Server**|varchar|varchar|
|**SQLite**|varchar, text|varchar|
### Email
#### Available Database Types
|Database| Types| Default Type|
|-----|----------|----------|
|**MySQL**|varchar|varchar|
|**PostgreSQL**|character varying|character varying|
|**SQL Server**|varchar||
|**SQLite**|varchar, text|varchar|
### URL
#### Available Database Types
|Database| Types| Default Type|
|-----|----------|----------|
|**MySQL**|text, tinytext, mediumtext, longtext, varchar|varchar|
|**PostgreSQL**|character varying, text|character varying|
|**SQL Server**|varchar, text|varchar|
|**SQLite**|varchar, text|varchar|
### Number
#### Available Database Types
|Database| Types| Default Type|
|-----|----------|----------|
|**MySQL**|int, smallint, mediumint, bigint, bit, float, decimal, double, serial|int|
|**PostgreSQL**|int, integer, bigint, bigserial, int2, int4, int8, serial, serial2, serial8, double precision, float4, float8, smallint, smallserial|int8|
|**SQL Server**|int, bigint, bit, decimal, float, numeric, real, smallint, tinyint|int|
|**SQLite**|int, integer, tinyint, smallint, mediumint, bigint, int2, int8, numeric, real, double, double precision, float|integer|
### Decimal
#### Available Database Types
|Database| Types| Default Type|
|-----|----------|----------|
|**MySQL**|float, decimal, double, serial|decimal|
|**PostgreSQL**|double precision,float4,float8|decimal|
|**SQL Server**|decimal, float|decimal|
|**SQLite**|real, double, double precision, float, numericdecimal|
### Currency
#### Available Database Types
|Database| Types| Default Type|
|-----|----------|----------|
|**MySQL**|decimal, float, double, serial', 'int, smallint, mediumint, bigint, bit|decimal|
|**PostgreSQL**|int, integer, bigint, bigserial, int2, int4, int8, serial, serial2, serial8, double precision, money', 'float4, float8|decimal|
|**SQL Server**|int, bigint, bit, decimal, float, numeric, real, smallint, tinyint|decimal|
|**SQLite**|real, double, double precision, float, int, integer, tinyint, smallint, mediumint, bigint, int2, int8, numeric|double precision|
### Percent
#### Available Database Types
|Database| Types| Default Type|
|-----|----------|----------|
|**MySQL**|decimal, float, double, serial', 'int, smallint, mediumint, bigint, bit|double|
|**PostgreSQL**|int, integer, bigint, bigserial, int2, int4, int8, serial, serial2, serial8, double precision, float4, float8, smallint, smallserial|double|
|**SQL Server**|int, bigint, bit, decimal, float, numeric, real, smallint, tinyint|double|
|**SQLite**|real, double, double precision, float, int, integer, tinyint, smallint, mediumint, bigint, int2, int8, numeric|double|
### Duration
#### Available Database Types
|Database| Types| Default Type|
|-----|----------|----------|
|**MySQL**|decimal, float, double, serial', 'int, smallint, mediumint, bigint, bit|int|
|**PostgreSQL**|int, integer, bigint, bigserial, int2, int4, int8, serial, serial2, serial8, double precision, float4, float8, smallint, smallserial|int8|
|**SQL Server**|int, bigint, bit, decimal, float, numeric, real, smallint, tinyint|int|
|**SQLite**|int, integer, tinyint, smallint, mediumint, bigint, int2, int8|integer|
### Rating
#### Available Database Types
|Database| Types| Default Type|
|-----|----------|----------|
|**MySQL**|decimal, float, double, serial', 'int, smallint, mediumint, bigint, bit|float|
|**PostgreSQL**|int, integer, bigint, bigserial, int2, int4, int8, serial, serial2, serial8, double precision, float4, float8, smallint, smallserial|float8|
|**SQL Server**|int, bigint, bit, decimal, float, numeric, real, smallint, tinyint|float|
|**SQLite**|real, double, double precision, float, int, integer, tinyint, smallint, mediumint, bigint, int2, int8, numeric|float|
### Formula
For more about formula visit [here](./formula)
### Count
#### Available Database Types
|Database| Types| Default Type|
|-----|----------|----------|
|**MySQL**|int, smallint, mediumint, bigint, serial|int|
|**PostgreSQL**|int, integer, bigint, bigserial, int2, int4, int8, serial, serial2, serial8, smallint, smallserial|int8|
|**SQL Server**|int, bigint, smallint, tinyint|int|
|**SQLite**|int, integer, tinyint, smallint, mediumint, bigint, int2, int8|integer|
### DateTime
#### Available Database Types
|Database| Types| Default Type|
|-----|----------|----------|
|**MySQL**|datetime, timestamp, varchar|datetime|
|**PostgreSQL**|timestamp, timestamp without time zone, timestamptz, timestamp with time zone|datetime|
|**SQL Server**|datetime, datetime2, datetimeoffset|datetime|
|**SQLite**|datetime, timestamp|datetime|
### CreateTime
#### Available Database Types
|Database| Types| Default Type|
|-----|----------|----------|
|**MySQL**|datetime, timestamp, varchar|datetime|
|**PostgreSQL**|timestamp, timestamp without time zone, timestamptz, timestamp with time zone|datetime|
|**SQL Server**|datetime, datetime2, datetimeoffset|datetime|
|**SQLite**|datetime, timestamp|datetime|
### Geometry
#### Available Database Types
|Database| Types|
|-----|----------|
|**MySQL**|geometry, point, linestring, polygon, multipoint, multilinestring, multipolygon|
|**PostgreSQL**|polygon, point, circle, box, line, lseg, path, circle|
|**SQL Server**|geometry|
|**SQLite**|text|
### SpecificDBType
#### Available Database Types
|Database| Types|
|-----|----------|
|**MySQL**|_All types are available_|
|**PostgreSQL**|_All types are available_|
|**SQL Server**|_All types are available_|
|**SQLite**|_All types are available_|

90
packages/noco-docs-prev/content/en/setup-and-usages/dashboard.md

@ -1,90 +0,0 @@
---
title: 'Dashboard'
description: 'Dashboard'
position: 500
category: 'Product'
menuTitle: 'Dashboard'
---
<announcement></announcement>
## Setup your first super admin
Once you have started NocoDB, you can visit the dashboard via `example.com/dashboard`.
Click `Let's Begin` button to sign up.
<img src="https://user-images.githubusercontent.com/35857179/126597128-f88df6e5-7625-4208-9817-68e9303410ff.png" width="75%"/>
Enter your work email and your password.
<alert>
Your password has at least 8 letters with one uppercase, one number and one special letter
</alert>
<img src="https://user-images.githubusercontent.com/35857179/126597144-0343b5ca-c7ca-47a4-926d-4e8df2f8c161.png" width="60%"/>
If you start your application without specifying `NC_DB`. A local SQLite will be created in root folder. Your data will be stored there.
If you are using Docker, it is recommended to mount `/usr/app/data/` for persistent volume (since `v0.10.6`), otherwise your data will be lost after recreating the container.
Example:
```
docker run -d -p 8080:8080 --name nocodb -v "$(pwd)"/nocodb:/usr/app/data/ nocodb/nocodb:latest
```
## Initialize your first project
Once you have logged into NocoDB, you should see `My Projects`.
![image](https://user-images.githubusercontent.com/35857179/126597182-b74cadb4-e165-417e-9e95-9a3cb7dce8e5.png)
To create a project, you can click `New Project`.
<img src="https://user-images.githubusercontent.com/86527202/144373314-9146e855-0791-4815-a03f-303e5ffb2a63.png" width="60%"/>
### Creating empty project
Click `Create`, you need to specify the project name and API type. A local SQLite will be used.
<img src="https://user-images.githubusercontent.com/35857179/126597259-b9552c71-d13b-463c-abc2-0f3be31627b2.png" width="60%"/>
### Connecting to external database
Click `Create By Connecting To An external Datbase`, you need to specify the project name, API type, and other database parameters.
![image](https://user-images.githubusercontent.com/35857179/126597279-c1722d8b-c885-4e9e-9e94-44711102af20.png)
Currently it supports MySQL, Postgres, MSSQL and SQLite.
![image](https://user-images.githubusercontent.com/35857179/126597320-fd6b19a9-ed3e-4f4a-80b7-880a79a54a11.png)
You can also configure associated SSL & advanced parameters.
![image](https://user-images.githubusercontent.com/35857179/126597342-0c61ab15-a112-4269-8f30-78455fa09081.png)
Click `Test Database Connection` to see if the connection can be established or not.
> NocoDB create's a new **empty database** with specified parameters, if the database doesn't exist.
### Creating project from Excel
Click `Create Project from Excel`, you can either upload/ drag and drop Excel file (OR) specify Excel file URL
<img src="https://user-images.githubusercontent.com/86527202/144373863-7ced9315-a70b-4746-9295-325e463dc110.png" width="60%"/>
Supported file formats
- Xls
- Xlsx
- Xlsm
- Ods
- Ots
A local SQLite will be used.

130
packages/noco-docs-prev/content/en/setup-and-usages/formulas.md

@ -1,130 +0,0 @@
---
title: "Formulas"
description: "Formulas"
position: 570
category: "Product"
menuTitle: "Formulas"
---
<announcement></announcement>
## Adding formula column
![Formula](https://user-images.githubusercontent.com/86527202/144246227-42c44df6-7e3e-4b2c-9bb9-a3c213bcad20.png)
### 1. Click on '+' (Add column)
### 2. Populate column Name
### 3. Select column Type as 'Formula'
### 4. Insert required formula
- Can use column names in equation
- Can use explicit numberical values/ strings as needed
- Table below lists supported formula & associated syntax
- Nested formula (formula equation referring to another formula column) are not supported
### 5. Click on 'Save'
## Available Formula Features
### Numeric Functions
| Name | Syntax | Sample | Output |
|-------------|----------------------------|----------------------------------|------------------------------------------------------------------|
| **ABS** | `ABS(value)` | `ABS(Column)` | Absolute value of the input parameter |
| **ADD** | `ADD(value1,[value2,...])` | `ADD(Column1, Column1)` | Sum of input parameters |
| **AVG** | `AVG(value1,[value2,...])` | `AVG(Column1, Column1)` | Average of input parameters |
| **CEILING** | `CEILING(value)` | `CEILING(Column)` | Rounded next largest integer value of input parameter |
| **EXP** | `EXP(value)` | `EXP(Column)` | Exponential value of input parameter (`e^x`) |
| **FLOOR** | `FLOOR(value)` | `FLOOR(Column)` | Rounded largest integer less than or equal to input parameter |
| **INT** | `INT(value)` | `INT(Column)` | Integer value of input parameter |
| **LOG** | `LOG([base], value)` | `LOG(10, Column)` | Logarithm of input parameter to the base (default = e) specified |
| **MAX** | `MAX(value1,[value2,...])` | `MAX(Column1, Column2, Column3)` | Maximum value amongst input parameters |
| **MIN** | `MIN(value1,[value2,...])` | `MIN(Column1, Column2, Column3)` | Minimum value amongst input parameters |
| **MOD** | `MOD(value1, value2)` | `MOD(Column, 2)` | Remainder after integer division of input parameters |
| **POWER** | `POWER(base, exponent)` | `POWER(Column, 3)` | `base` to the `exponent` power, as in `base^exponent` |
| **ROUND** | `ROUND(value)` | `ROUND(Column)` | Nearest integer to the input parameter |
| **SQRT** | `SQRT(value)` | `SQRT(Column)` | Square root of the input parameter |
### Numeric Operators
| Operator | Sample | Description |
| -------- | ----------------------- | -------------------------------- |
| `+` | `column1 + column2 + 2` | Addition of numeric values |
| `-` | `column1 - column2` | Subtraction of numeric values |
| `*` | `column1 * column2` | Multiplication of numeric values |
| `/` | `column1 / column2` | Division of numeric values |
> To change order of arithmetic operation, use round bracket parantheses `()`
> Example: `(column1 + (column2 * column3) / (3 - column4 ))`
### String Functions
| Name | Syntax | Sample | Output |
|-------------|----------------------------------|---------------------------------|---------------------------------------------------------------------------|
| **CONCAT** | `CONCAT(str1, [str2,...])` | `CONCAT(fName, ' ', lName)` | Concatenated string of input parameters |
| **LEFT** | `LEFT(str1, [str2,...])` | `LEFT(Column, 3)` | `n` characters from the beginning of input parameter |
| **LEN** | `LEN(str)` | `LEN(Title)` | Input parameter character length |
| **LOWER** | `LOWER(str)` | `LOWER(Title)` | Lower case converted string of input parameter |
| **MID** | `SUBTR(str, position, [count])` | `MID(Column, 3, 2)` | Alias for `SUBSTR` |
| **REPEAT** | `REPEAT(str, count)` | `REPEAT(Column, 2)` | Specified copies of the input parameter string concatenated together |
| **REPLACE** | `REPLACE(str, srchStr, rplcStr)` | `REPLACE(Column, 'int', 'num')` | String, after replacing all occurrences of `srchStr` with `rplcStr` |
| **RIGHT** | `RIGHT(str, count)` | `RIGHT(Column, 3)` | `n` characters from the end of input parameter |
| **SEARCH** | `SEARCH(str, srchStr)` | `SEARCH(Column, 'str')` | Index of `srchStr` specified if found, 0 otherwise |
| **SUBSTR** | `SUBTR(str, position, [count])` | `SUBSTR(Column, 3, 2)` | Substring of length 'count' of input string, from the postition specified |
| **TRIM** | `TRIM(str)` | `TRIM(Title)` | Remove trailing and leading whitespaces from input parameter |
| **UPPER** | `UPPER(str)` | `UPPER(Title)` | Upper case converted string of input parameter |
| **URL** | `URL(str)` | `URL(Column)` | Convert to a hyperlink if it is a valid URL |
### Date Functions
| Name | Syntax | Sample | Output |
|-------------|-----------------------------------------------------------|-------------------------------------------------------|-------------------------------------------------------------------------------------------------------|
| **DATEADD** | `DATEADD(DATE_COL, 1, 'day')` | `DATEADD(date, 1, 'day')` | Supposing the DATE_COL is 2022-03-14. The result is 2022-03-15. |
| | `DATEADD(DATE_TIME_COL, 2, 'month')` | `DATEADD(datetime, 2, 'month')` | Supposing the DATE_COL is 2022-03-14 03:14. The result is 2022-05-14 03:14. |
| | `IF(NOW() < DATE_COL, "true", "false")` | `IF(NOW() < date, "true", "false")` | If current date is less than DATE_COL, it returns true. Otherwise, it returns false. |
| | `IF(NOW() < DATEADD(DATE_COL,10,'day'), "true", "false")` | `IF(NOW() < DATEADD(date,10,'day'), "true", "false")` | If the current date is less than DATE_COL plus 10 days, it returns true. Otherwise, it returns false. |
### Logical Operators
| Operator | Sample | Description |
| -------- | -------------------- | ------------------------ |
| `<` | `column1 < column2` | Less than |
| `>` | `column1 > column2` | Greater than |
| `<=` | `column1 <= column2` | Less than or equal to |
| `>=` | `column1 >= column2` | Greater than or equal to |
| `==` | `column1 == column2` | Equal to |
| `!=` | `column1 != column2` | Not equal to |
### Conditional Expressions
| Name | Syntax | Sample | Output |
|------------|------------------------------------------------|---------------------------------------------|-------------------------------------------------------------|
| **IF** | `IF(expr, successCase, [failCase])` | `IF(Column > 1, Value1, Value2)` | successCase if `expr` evaluates to TRUE, elseCase otherwise |
| **SWITCH** | `SWITCH(expr, [pattern, value, ..., default])` | `SWITCH(Column1, 1, 'One', 2, 'Two', '--')` | Switch case value based on `expr` output |
| **AND** | `AND(expr1, [expr2,...])` | `AND(Column > 2, Column < 10)` | TRUE if all `expr` evaluate to TRUE |
| **OR** | `OR(expr1, [expr2,...])` | `OR(Column > 2, Column < 10)` | TRUE if at least one `expr` evaluates to TRUE |
Logical operators, along with Numerical operators can be used to build conditional `expressions`.
Examples:
```bash
IF(marksSecured > 80, "GradeA", "GradeB")
```
```bash
SWITCH(quarterNumber,
1, 'Jan-Mar',
2, 'Apr-Jun',
3, 'Jul-Sep',
4, 'Oct-Dec',
'INVALID'
)
```

79
packages/noco-docs-prev/content/en/setup-and-usages/link-to-another-record.md

@ -1,79 +0,0 @@
---
title: "Link To Another Record"
description: "Link To Another Record"
position: 540
category: "Product"
menuTitle: "Link To Another Record"
---
<announcement></announcement>
### Relationship types:
- One to one
- A Table record in first table is related to only one record of second table.
- Example: Country has a capital city
- One to many
- A Table record in first table is related to more than one record of second table. But second table record maps to only one entry of first table
- NocoDB refers to this category of relationship as **has many**
- For every **has many** relation defined, NocoDB augments **belongs to** relationship column in the other table automatically
- Example: Country **has many** Cities. (other way mapping > City **belongs to** Country )
- Many to many
- A Table record in first table is related to more than one record of second table; second table record can also map to more than on record of first table.
- NocoDB refers to this category of relationship as **many to many**
- For every **many to many** relation defined between tables, NocoDB augments **many to many** relationship column in the other table automatically
- Example: Film **has many** Actors. Actor **has many** Films (works on many films)
Further details of relationship types can be found [here](https://afteracademy.com/blog/what-are-the-different-types-of-relationships-in-dbms)
Relationships between table records can be established by using **LinkToAnotherRecord** column type.
Workflow details are captured below
## Adding a relationship
![1](https://user-images.githubusercontent.com/86527202/144224170-43f4194f-83d4-4291-8c91-1f66ea1caeda.png)
### 1. Create column
Click on '+' button at end of column headers
### 2. Update column name
Input name in the text box provided
### 3. Select column type
Select Column type as "LinkToAnotherRecord" from the drop-down menu
### 4. Choose relationship type
'Has Many': corresponds to the 'One-to-many' relationships
'Many To Many': corresponds to the 'Many-to-many' relationships
### 5. Select child table from drop down menu
### 6. Click on 'Save'
A new column will get created in both the parent table & child table
## Updating linked records
### 1. Open link record tab
Click on the '+' icon in corresponding row - cell
![2truncate](https://user-images.githubusercontent.com/86527202/144224728-1cba50e3-323e-4578-be48-d2a205fb472c.png)
### 2. Select from the option displayed
Use 'Filter box' to narrow down on search items
You can opt to insert a new record as well, using "+ New Record" button
![3](https://user-images.githubusercontent.com/86527202/144224530-a258775f-1eea-4c79-88ed-a377d1e35a26.png)
### 3. Column mapping showing "Has Many" relationship
Country 'has many' City
### 4. Column mapping for "Belongs to" relationship [Automatically updated]
City 'belongs to' Country
![4](https://user-images.githubusercontent.com/86527202/144224542-d28be060-a077-468a-bdc4-b2e8a783d75f.png)

53
packages/noco-docs-prev/content/en/setup-and-usages/lookup.md

@ -1,53 +0,0 @@
---
title: "Lookup"
description: "Lookup"
position: 550
category: "Product"
menuTitle: "Lookup"
---
<announcement></announcement>
## Lookup
#### Sample simple Organization structure:
- 5 verticals, each vertical has a team name & associated team code
- 5 employees working at different verticals
- Vertical **has many** Employees : relationship has been defined
<img src="https://user-images.githubusercontent.com/86527202/144038845-402d5401-a214-4166-bc07-fcf8dcc8a961.png" width="125%"/>
Now, we can explore how to extract team-code information in Employee table using **"LOOKUP"** columns
## Adding a lookup column
### 1. Add new column
<img src="https://user-images.githubusercontent.com/86527202/144230901-11dc69e7-3e4d-481d-b682-b7d73e6352c0.png" width="60%"/>
Click on '+' icon to the left of column headers in Employee table
### 2. Feed column name
<img src="https://user-images.githubusercontent.com/86527202/144230954-40646872-4a05-45fd-9a4f-52b8b00a3a7d.png" width="60%"/>
### 3. Select column type as 'Lookup'
<img src="https://user-images.githubusercontent.com/86527202/144230982-37d08274-ce63-4a28-a30a-bd6b41c3b489.png" width="60%"/>
### 4. Choose child table
Table Verticals in our example
<img src="https://user-images.githubusercontent.com/86527202/144231016-b277270d-62e4-4607-9aaa-b253621808a0.png" width="60%"/>
### 5. Select child column
<img src="https://user-images.githubusercontent.com/86527202/144231774-2bdd9988-d3f8-4933-96c6-5b710d645905.png" width="60%"/>
### 6. Click on 'Save'
<img src="https://user-images.githubusercontent.com/86527202/144231320-9e8b3465-a9a4-4cf7-a9fe-65d47ab8b96c.png" width="60%"/>
### 7. Required information is populated in the newly created column
<img src="https://user-images.githubusercontent.com/86527202/144231230-0e013684-b11c-4dce-bacf-9feee5546f26.png" width="60%"/>

66
packages/noco-docs-prev/content/en/setup-and-usages/meta-management.md

@ -1,66 +0,0 @@
---
title: 'Metadata'
description: 'Metadata'
position: 600
category: 'Product'
menuTitle: 'Metadata'
---
<announcement></announcement>
To go to the Meta Management Portal, click ``Project Metadata`` under ``Settings`` on the leftmost menu.
![image](https://user-images.githubusercontent.com/35857179/126929430-1ad086a8-0611-4f39-8c7f-580637574056.png)
## Project Metadata
The metadata is stored in meta directory in project level, database level, and API level.
Under ``Project Metadata``, you can perform the following operations.
- Export all metadata from the meta tables to meta directory
- Import all metadata from the meta directory to meta tables
- Export project meta to zip file and download
- Import project meta zip file and restart
- Clear all metadata from meta tables
<alert>
Import won't work with zip files exported from the older version of apps (< 0.11.6). <br>
Import / Export will only transfer metadata and files related to the project and not any table data in the project.
</alert>
## Migration example
### Export metadata
Source project : Under ``Meta Management`` tab, select ``Export zip``, click ``Submit``. This step extracts project metadata and stores it in compressed (zip) format
![meta-dev](https://user-images.githubusercontent.com/86527202/130780497-89578bd0-a417-468a-92d8-88c5c07a72b0.png "Step-Export")
### Import metadata
Destination project : Under ``Meta Management`` tab, select ``Import zip``, select ``meta.zip`` file stored in previous step. This step imports project metadata from compressed file (zip) selected and restarts project.
![meta-prod](https://user-images.githubusercontent.com/86527202/130781015-3477e596-b1bc-4189-9853-bfd850157ba8.png)
---
## Database Metadata
Under ``DB Metadata``, You can manage your models. For example, if you do not want to expose some APIs, you can untick those under APIs here.
![image](https://user-images.githubusercontent.com/35857179/127611038-a10ccee5-72ca-42cf-a55b-c8268c9fbe5c.png)
The relations of all tables are listed under ``Relations``.
![image](https://user-images.githubusercontent.com/35857179/127611116-0289f739-bad7-45a0-b2bd-bfd8565f50b8.png)
## UI Access Control
You can control the access to each table and relation by roles.
![image](https://user-images.githubusercontent.com/35857179/127611188-339de6ca-e648-47c0-a358-eee0d03ae9d0.png)
![image](https://user-images.githubusercontent.com/35857179/127611237-5c43e194-a8ba-4e33-b473-5b690a38e80d.png)

34
packages/noco-docs-prev/content/en/setup-and-usages/primary-value.md

@ -1,34 +0,0 @@
---
title: "Primary value"
description: "Primary value"
position: 575
category: "Product"
menuTitle: "Primary value"
---
<announcement></announcement>
## What is a 'Primary value' ?
- Primary value as the name stands is the primary or main value within a row of a table that you generally associate that row with.
- It should be usually associated with a column which is uniquely identifiable. However, this uniqueness is not enforced at the database level.
## What is the use of 'Primary value' ?
- Within a spreadsheet, primary value are always highlighted so that it is easier to recognise what row we are in.
- And when LinkToAnotherRecord is created between two tables - it is the primary value that appears in LinkToAnotheRecord column.
#### Example : ```Primary value```highlighted in actor table
<img width="547" alt="actor" src="https://user-images.githubusercontent.com/5435402/152645708-92b83985-4a0a-42b2-9d01-d26be70fd3aa.png">
#### Example : ```Primary value``` highlighted in film table
<img width="1406" alt="film-table" src="https://user-images.githubusercontent.com/5435402/152645713-b4df99b2-4eb7-4fea-85f9-0baf47470ef3.png">
#### Example : ```Primary value``` associated when ```LinkToAnotherRecord``` is created
<img width="753" alt="actor-film" src="https://user-images.githubusercontent.com/5435402/152645714-4061c94a-4cfb-44e5-b112-63cf4ed869fe.png">
## How is ```Primary value``` identfied for existing database tables ?
- It is usually the first column after the primary key which is not a number.
- If there is no column which is not a number then the column adjacent to primary key is chosen.
## Can I change the ```Primary Value``` to another column within tables ?
- Yes, you can. Hover over column which you want as primary column and click ```Set as Primary Value```

74
packages/noco-docs-prev/content/en/setup-and-usages/rollup.md

@ -1,74 +0,0 @@
---
title: "Rollup"
description: "Rollup"
position: 560
category: "Product"
menuTitle: "Rollup"
---
<announcement></announcement>
## Rollup
Sample simple Organization structure:
- 5 verticals, each vertical has a team name & associated team code
- 5 employees working at different verticals
- Vertical **has many** Employees : relationship has been defined
![LookUp](https://user-images.githubusercontent.com/86527202/144038845-402d5401-a214-4166-bc07-fcf8dcc8a961.png)
### RollUp AGGREGATION functions supported
- Count
- Minimum
- Maximum
- Average
- Sum
- Count Distinct
- Sum Distinct
- Average Distinct
Now, we can explore how to extract employee count information per vertical using **"ROLLUP"** columns
## Adding a rollup column
### 1. Add new column
Click on '+' icon to the left of column headers in Verticals table
![1](https://user-images.githubusercontent.com/86527202/144236273-484edc5b-7f5f-4041-b480-db08d4459d07.png)
### 2. Feed column name
![2](https://user-images.githubusercontent.com/86527202/144236279-41904955-4990-4a23-bec6-b0953002eac6.png)
### 3. Select Column type as 'Rollup'
![3](https://user-images.githubusercontent.com/86527202/144236283-4596e3e1-3bf8-488f-bc9b-8ec1466a35c6.png)
### 4. Choose Child Table
Table Employee in our example
![4](https://user-images.githubusercontent.com/86527202/144236284-301178d8-f452-4d1e-9dff-80dd9570c280.png)
### 5. Choose on Child column
Pick appropriate column for aggreagation
![5](https://user-images.githubusercontent.com/86527202/144236286-28547d74-feb8-4ad8-a872-7ba809e5db1e.png)
### 6. Select Aggregate function
Aggregate function will be "count" in our case
![6](https://user-images.githubusercontent.com/86527202/144236288-34a567d5-a5e9-4a1e-b074-5ea633e799a3.png)
### 7. Click on Save
![7](https://user-images.githubusercontent.com/86527202/144236289-5872529a-ba47-428d-979e-fdefb92a1039.png)
### 8. Column TeamCount is populated with appropriate information
![8](https://user-images.githubusercontent.com/86527202/144236291-52855f92-ad8b-4be1-aa98-b5cfdb1ee108.png)

95
packages/noco-docs-prev/content/en/setup-and-usages/share-base.md

@ -1,95 +0,0 @@
---
title: "Share Base"
description: "Procedure to share a base & generating embedded iframe"
position: 615
category: "Product"
menuTitle: "Share Base"
---
<announcement></announcement>
## Generate 'Share base'
- Open Project
- Click on 'Share' button on top right tool bar
![Screenshot 2022-02-19 at 11 11 39 AM](https://user-images.githubusercontent.com/86527202/154789342-11546764-11ac-4ad1-a830-84cb603156b7.png)
- Under 'Shared base link' tab
- Toggle from 'Disabled Share base' to 'Anyone with the link'
![Screenshot 2022-02-19 at 11 16 02 AM](https://user-images.githubusercontent.com/86527202/154789352-87e65fcc-fbe5-48f0-a1e1-e54dce91a1f3.png)
- Share base link generated is displayed over & can be used to share this project to others in the team [Selection (2) in the image below]
![Screenshot 2022-02-19 at 12 01 58 PM](https://user-images.githubusercontent.com/86527202/154789725-a1194e30-3101-423a-bd5c-25009c361b96.png)
## Modify 'Share base'
Modify 'Share base' will invalidate earlier generated 'Share base' link & generate a new link.
- Open Project base
- Click on 'Share' button on top right tool bar
- Under 'Shared base link' tab
- Click on 'Reload' button
## Disable 'Share base'
Disable 'Share base' will invalidate generated 'Share base' link
- Open Project base
- Click on 'Share' button on top right tool bar
- Under 'Shared base link' tab
- Toggle from 'Anyone with the link' to 'Disable Share base'
## 'Share base' access permissions
Shared base can be configured as
- Viewer: User with the link will get READ ONLY access to the project data
- Editor: User with the link will get READ WRITE access to the project data
## Embeddable Frame
NocoDB interface can be embedded into existing applications easily by making use of [HTML IFRAME](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe)) attribute.
### Generate embeddable HTML code
- Open Project base
- Click on 'Share' button on top right tool bar
- Under 'Shared base link' tab
- Click on </> button to copy 'Embeddable HTML code'
Sample
```html
<iframe
class="nc-embed"
src="https://nocodb-nocodb-rsyir.ondigitalocean.app/dashboard/#/nc/base/e3bba9df-4fc1-4d11-b7ce-41c4a3ad6810?embed"
frameborder="0"
width="100%"
height="700"
>
style="background: transparent; border: 1px solid #ddd"></iframe
>
```
### Embed into application's HTML Body
Sample code with embedded iframe generated above
```html
<!DOCTYPE html>
<html>
<body>
<iframe
class="nc-embed"
src="http://localhost:3000/#/nc/base/7d4b551c-b5e0-41c9-a87b-f3984c21d2c7?embed"
frameborder="0"
width="100%"
height="700"
style="background: transparent; "
></iframe>
</body>
</html>
```

30
packages/noco-docs-prev/content/en/setup-and-usages/sync-schema.md

@ -1,30 +0,0 @@
---
title: 'Sync Schema'
description: 'Schema changes made to database from outside nocodb GUI can be synced'
position: 610
category: 'Product'
menuTitle: 'Sync Schema'
---
<announcement></announcement>
## How to sync schema changes to NocoDB.
NocoDB allows you to sync schema changes if you have made changes outside NocoDB GUI. However, it has to be noted then you will have to bring your own
schema migrations for moving from environment to other.
Below are the steps to sync schema changes.
1. Under `Settings` menubar, click `Project Metadata`
2. Under `Meta Management` tab, click on `Metadata` sub tab.
3. Changes carried outside GUI, identified by NocoDB are listed under `Sync state`
4. Click `Sync Now` to complete Schema sync procedure.
![metasync](https://user-images.githubusercontent.com/86527202/147923717-630f0e0f-7c7a-431c-a50d-8f9376a06eb7.png)
## Note
1. Column rename operation will be treated like 'column delete' & 'column create' operation
2. Only table schema changes identified will be listed under `Sync state`; any changes to records are automatically synchronized.

114
packages/noco-docs-prev/content/en/setup-and-usages/table-operations.md

@ -1,114 +0,0 @@
---
title: "Table Operations"
description: "Table Operations"
position: 510
category: "Product"
menuTitle: "Table Operations"
---
<announcement></announcement>
Once you have created a new NocoDB project you can open it, In the browser, the URL would be like `example.com/dashboard/#/nc/project_id`.
## Table
### Table Create
Now you can start creating new tables by simply clicking one of the following options.
![table_create](https://user-images.githubusercontent.com/61551451/126771744-063f22da-6def-43fe-b9ef-1744d104db9d.png)
On click, in modal popup, enter the table name, enable/disable default columns and click `Submit` button.
![table_create_modal](https://user-images.githubusercontent.com/61551451/126772859-5a301c45-d830-4df2-a05a-43b15dd77728.png)
> You can't disable the `id` column since NocoDB need's a primary column for every table.
After the successful submission, the table will be created and open as a new tab.
![TableCreated](https://user-images.githubusercontent.com/86527202/144402089-b5e35564-80d5-4105-9e00-7e3e1c4a5030.png)
### Table Rename
Right click on Table name on left hand project-tree menu, select `Rename`
In modal popup, enter new table name and click `Submit` button
<img src="https://user-images.githubusercontent.com/86527202/144403447-1b2e4368-eb2b-40c0-901a-54e8adf9a80c.png" width="60%"/>
### Table Delete
The table can be deleted using the `delete` icon present in the toolbar within the table tab.
<img src="https://user-images.githubusercontent.com/86527202/144403591-5d3d36eb-64b7-4057-9244-56a95b47b97b.png" width="60%"/>
## Column
### Column Add
Click the `+` icon on the right corner of the table.
![Pasted_Image_23_07_21__4_39_PM](https://user-images.githubusercontent.com/61551451/126773798-4470d632-69e0-4f5f-803b-e3597715fe22.png)
After the click, it will show a menu and you can enter the column name and choose the column type ([Abstract type](./abstract-types)).
Click `Save`button to create the new column.
![image](https://user-images.githubusercontent.com/61551451/126774157-ae9af236-e1ad-4a54-adb7-1b96775cae57.png)
& we have new column created as part of our table
![Pasted_Image_23_07_21__4_43_PM](https://user-images.githubusercontent.com/61551451/126774276-e947f510-2fe1-4595-afc1-a31d2c35a69a.png)
> For more about Abstract type [click here](./abstract-types).
### Column Edit
To edit column properties, click/hover on down arrow, select `Edit` from the menu.
<img src="https://user-images.githubusercontent.com/86527202/144404169-80d8b514-53cf-4bb1-8323-fd3cfda8816b.png" width="50%"/>
You will be able to edit column name & associated datatype using pop-up modal.
For additional menu options, click `Show more options`
<img src="https://user-images.githubusercontent.com/86527202/144404188-146ab0dc-bd2b-4902-9369-a34253e2fad6.png" width="40%"/>
### Column Delete
Column deletion can be done by using the `delete` option from the column header menu.
![Pasted_Image_23_07_21__6_49_PM](https://user-images.githubusercontent.com/61551451/126787679-562aaa22-14b3-4ff8-8057-b8219e057110.png)
## Row
For adding new values to the table we need new rows, new rows can be added in two methods.
### Row Add (Using Form)
- Click the `+` icon in the toolbar of the table tab.
<img src="https://user-images.githubusercontent.com/86527202/144405563-50573b1c-1bd3-43ea-8020-357fc7ef9e42.png" width="50%"/>
- Now it will open a modal Form to enter the values, provide the values and press the save button.
<img src="https://user-images.githubusercontent.com/61551451/126784347-b82f9dfd-4c6d-4d65-be07-80e051ff19de.png" width="75%">
- After saving it will be there on your table.
![image](https://user-images.githubusercontent.com/61551451/126785340-e9b80ad0-ba06-4a22-8a01-876d829c9673.png)
### Row Add (Using Table Row at bottom of page)
- Click the bottom row of the table which contains `+` icon at the beginning.
<img src="https://user-images.githubusercontent.com/86527202/144405773-bb0d00ef-264d-4941-b01f-3b7f0b1fc54d.png" width="40%"/>
- Now it will add a new row in the table
### Row Edit
You can start editing by any of the following methods
- Double click on cell to edit
- Click on cell and start typing (this way it will clear the previous content)
- Click on cell and press enter to start editing
- And it will automatically save on blur event or if inactive.
### Row Delete
Right-click on anywhere in the row and then from the context menu select `Delete Row` option.
Bulk delete is also possible by selecting multiple rows by using the checkbox in first column and then `Delete Selected Rows` options from the right click context menu.
<img src="https://user-images.githubusercontent.com/86527202/144406191-ccff1382-e808-44e8-babe-bd937faf1b3d.png" width="40%"/>

109
packages/noco-docs-prev/content/en/setup-and-usages/team-and-auth.md

@ -1,109 +0,0 @@
---
title: 'Team & Auth'
description: 'Breakdown of roles & permissions for team user management'
position: 620
category: 'Product'
menuTitle: 'Team & Auth'
---
<announcement></announcement>
## How to Add a User
1. On the left panel, click on "Team & Auth":
[](https://user-images.githubusercontent.com/55474996/142497814-c52e12e5-5ab5-41e7-ac48-2b6af5f31fdd.png)
2. Make sure you are on the "Users Management" tab. Click on "New User":
[](https://user-images.githubusercontent.com/55474996/142498070-60c5a861-0e8e-49e9-8830-42f54aa1fbf1.png)
| ![1a](https://user-images.githubusercontent.com/86527202/149292053-e6dfef1e-9627-47a7-98ad-8a3b2f61591b.png) |
| ------ |
3. Enter the person's `EMAIL`
4. Select `ROLE`
5. Click `Invite`
> You can add multiple comma (,) seperated emails
[](https://user-images.githubusercontent.com/55474996/142498163-032187e4-d375-4542-8211-e986880a2bb0.png)
| ![2 1](https://user-images.githubusercontent.com/86527202/149291166-d28a65b7-195a-4233-97a9-a3c2259c9fc8.png) |
| ------ |
If you do not have an SMTP sender configured, make sure to copy the invite link and manually send it to your collaborator:
[](https://user-images.githubusercontent.com/55474996/142498376-ff52276b-92d8-4aca-8c47-fd7efea50ab6.png)
| ![3](https://user-images.githubusercontent.com/86527202/149291202-967f164b-8ddc-4240-a470-ce8b4e0c2d41.png) |
| ------ |
| ![4](https://user-images.githubusercontent.com/86527202/149291223-dfc9e24b-658d-45fb-a0d5-c9773162bfbe.png) |
## Explanation of User Role Permissions
### Advanced options & configurations
| &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; Owner &nbsp; &nbsp;| &nbsp; &nbsp; Creator &nbsp; &nbsp; | &nbsp; &nbsp; Editor &nbsp; &nbsp;| Commenter | &nbsp; &nbsp; Viewer &nbsp; &nbsp;|
| :-- | :-: | :-: | :-: | :-: | :-: |
| Audit | ✅ | ✅ | ❌ | ❌ | ❌ |
| App Store | ✅ | ❌ | ❌ | ❌ | ❌ |
| Team & Auth | ✅ | ❌ | ❌ | ❌ | ❌ |
| Project Metadata | ✅ | ❌ | ❌ | ❌ | ❌ |
| New user: Add Owner | ✅ | ❌ | ❌ | ❌ | ❌ |
| New user: Add Creator | ✅ | ❌ | ❌ | ❌ | ❌ |
| New user: Add Editor | ✅ | ✅ | ❌ | ❌ | ❌ |
| New user: Add Commenter | ✅ | ✅ | ❌ | ❌ | ❌ |
| New user: Add Viewer | ✅ | ✅ | ❌ | ❌ | ❌ |
| View existing users | ✅ | ✅ | ❌ | ❌ | ❌ |
| Preview mode | ✅ | ✅ | ❌ | ❌ | ❌ |
### Schema options
| &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; Owner &nbsp; &nbsp;| &nbsp; &nbsp; Creator &nbsp; &nbsp; | &nbsp; &nbsp; Editor &nbsp; &nbsp;| Commenter | &nbsp; &nbsp; Viewer &nbsp; &nbsp;|
| :-- | :-: | :-: | :-: | :-: | :-: |
| Add table | ✅ | ✅ | ❌ | ❌ | ❌ |
| Delete table | ✅ | ✅ | ❌ | ❌ | ❌ |
| Modify table | ✅ | ✅ | ❌ | ❌ | ❌ |
| Add column | ✅ | ✅ | ❌ | ❌ | ❌ |
| Delete column | ✅ | ✅ | ❌ | ❌ | ❌ |
| Modify column | ✅ | ✅ | ❌ | ❌ | ❌ |
### Record options
| &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; Owner &nbsp; &nbsp;| &nbsp; &nbsp; Creator &nbsp; &nbsp; | &nbsp; &nbsp; Editor &nbsp; &nbsp;| Commenter | &nbsp; &nbsp; Viewer &nbsp; &nbsp;|
| :-- | :-: | :-: | :-: | :-: | :-: |
| Add row | ✅ | ✅ | ✅ | ❌ | ❌ |
| Delete row | ✅ | ✅ | ✅ | ❌ | ❌ |
| Modify row/ cell | ✅ | ✅ | ✅ | ❌ | ❌ |
| Expand row | ✅ | ✅ | ✅ | ❌ | ❌ |
| Right click on cell (add/edit row) | ✅ | ✅ | ✅ | ❌ | ❌ |
| View table data (cell) contents | ✅ | ✅ | ✅ | ✅ | ✅ |
### Comments
| &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; Owner &nbsp; &nbsp;| &nbsp; &nbsp; Creator &nbsp; &nbsp; | &nbsp; &nbsp; Editor &nbsp; &nbsp;| Commenter | &nbsp; &nbsp; Viewer &nbsp; &nbsp;|
| :-- | :-: | :-: | :-: | :-: | :-: |
| View comments from others | ✅ | ✅ | ✅ | ✅ | ❌ |
| Add comments | ✅ | ✅ | ✅ | ✅ | ❌ |
### Views
| &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; Owner &nbsp; &nbsp;| &nbsp; &nbsp; Creator &nbsp; &nbsp; | &nbsp; &nbsp; Editor &nbsp; &nbsp;| Commenter | &nbsp; &nbsp; Viewer &nbsp; &nbsp;|
| :-- | :-: | :-: | :-: | :-: | :-: |
| Create new view | ✅ | ✅ | ❌ | ❌ | ❌ |
| Share view | ✅ | ✅ | ❌ | ❌ | ❌ |
### Project generals
| &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; Owner &nbsp; &nbsp;| &nbsp; &nbsp; Creator &nbsp; &nbsp; | &nbsp; &nbsp; Editor &nbsp; &nbsp;| Commenter | &nbsp; &nbsp; Viewer &nbsp; &nbsp;|
| :-- | :-: | :-: | :-: | :-: | :-: |
| Created views access | ✅ | ✅ | ✅ | ✅ | ✅ |
| Filter fields/ Column | ✅ | ✅ | ✅ | ✅ | ✅ |
| Filter fields/ Query | ✅ | ✅ | ✅ | ✅ | ✅ |
| Sort fields | ✅ | ✅ | ✅ | ✅ | ✅ |
| Theme | ✅ | ✅ | ✅ | ✅ | ✅ |
| Auth token | ✅ | ✅ | ✅ | ✅ | ✅ |
| Project Info | ✅ | ✅ | ✅ | ✅ | ✅ |
| Swagger API | ✅ | ✅ | ✅ | ✅ | ✅ |
### Automations
| &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; Owner &nbsp; &nbsp;| &nbsp; &nbsp; Creator &nbsp; &nbsp; | &nbsp; &nbsp; Editor &nbsp; &nbsp;| Commenter | &nbsp; &nbsp; Viewer &nbsp; &nbsp;|
| :-- | :-: | :-: | :-: | :-: | :-: |
### App store
| &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; Owner &nbsp; &nbsp;| &nbsp; &nbsp; Creator &nbsp; &nbsp; | &nbsp; &nbsp; Editor &nbsp; &nbsp;| Commenter | &nbsp; &nbsp; Viewer &nbsp; &nbsp;|
| :-- | :-: | :-: | :-: | :-: | :-: |

71
packages/noco-docs-prev/content/en/setup-and-usages/usage-information.md

@ -1,71 +0,0 @@
---
title: 'Usage Information'
description: 'Non-sensitive and anonymous usage information'
position: 900
category: 'Product'
menuTitle: 'Usage Information'
---
<announcement></announcement>
NocoDB is a fast growing open source project which is UI heavy and we are committed to providing a solution that exceeds the expectations of the users and community.
We are also committed to continuing to develop and make NocoDB even better than it is today.
To that end, NocoDB contains a feature in which anonymous and otherwise non-sensitive data is collected.
This anonymous and non-sensitive data gives a better understanding of how users are interacting and using the product.
## Context
We will always continue to do hands-on UI/UX testing, surveys, issue tracking and roadmap.
Otherwise talk with the Community while striving to understand
and deliver what is being asked for and what is needed, by any means available.
However, these above actions alone are often insufficient
- To maintain an overall picture of the product usage.
- Prioritising the efforts.
- Impact of any breaking changes.
- To understand whether UI improvements are helpful to users.
## What we collect ?
We collect actions made on models (project, table, view, sharedView, user, hook, image, sharedBase etc) periodically with :
- Unique machine ID (generated with node-machine-id)
- Environment (dev, staging, production)
- System information (OS, node version, docker or npm)
- Failures.
Here is an example :
```
{
"machine_id" : "a0885e8e6a38d9fbb5d39e7d04a44da7773d4f",
"evt_type": "project:created"
"package_id" : "0.84.15",
"os_type" : "Linux",
"os_platform" : "linux",
"os_release" : "5.10.25-linuxkit",
"node_version" : "14.18.2",
"docker" : "true",
"xc_version" : "0.84.15",
"env" : "dev",
}
```
Our UI Dashboard is a Vuejs-Nuxtjs app. Actions taken on UI with completely anonymized route names are sent as payload.
Here is an example :
```
{
"id": "a0885e8e6a38d9fbb5d39e7d04a44da7773d4f",
"event": "table:create",
"path": "/nc/:project_id",
}
```
## What we DO NOT collect ?
We do not collect any private or sensitive information, such as:
- Personally identifiable information
- Credential information (endpoints, ports, DB connections, username/password)
- User data
## Opt-out
To disable usage information collection please set following environment variable.
> NC_DISABLE_TELE=true

11
packages/noco-docs-prev/content/settings.json

@ -1,11 +0,0 @@
{
"title": "NocoDB",
"url": "https://docs.nocodb.com",
"logo": {
"light": "/favicon-128.png",
"dark": "/favicon-128.png"
},
"github": "nocodb/nocodb",
"defaultDir": "packages/noco-docs",
"twitter": "@nocodb"
}

11
packages/noco-docs-prev/nuxt.config.js

@ -1,11 +0,0 @@
import theme from '@nuxt/content-theme-docs'
export default theme({
docs: {
primaryColor: '#3282ff'
},
css: [
"./assets/main.css"
]
})

29925
packages/noco-docs-prev/package-lock.json generated

File diff suppressed because it is too large Load Diff

15
packages/noco-docs-prev/package.json

@ -1,15 +0,0 @@
{
"name": "noco-docs-prev",
"version": "1.0.0",
"license": "MIT",
"scripts": {
"dev": "nuxt",
"build": "nuxt build",
"start": "nuxt start",
"generate": "nuxt generate"
},
"dependencies": {
"@nuxt/content-theme-docs": "0.7.2",
"nuxt": "^2.15.2"
}
}

BIN
packages/noco-docs-prev/static/architecture.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

BIN
packages/noco-docs-prev/static/favicon-128.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

BIN
packages/noco-docs-prev/static/favicon-16.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 982 B

BIN
packages/noco-docs-prev/static/favicon-32.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

BIN
packages/noco-docs-prev/static/favicon-64.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

4
packages/noco-docs/content/en/engineering/architecture.md

@ -1,9 +1,9 @@
---
title: "NocoDB architecture"
title: "Architecture Overview"
description: "Simple overview of NocoDB architecture"
position: 3000
category: "Engineering"
menuTitle: "NocoDB architecture"
menuTitle: "Architecture Overview"
---
By default, if `NC_DB` is not specified, then SQLite will be used to store your meta data. We suggest users to separate the meta data and user data in different databases.

129
packages/noco-docs/content/en/engineering/builds-and-releases.md

@ -1,33 +1,129 @@
---
title: "Build on Pull Requests"
title: "Releases & Builds"
description: "NocoDB creates Docker and Binaries for each PR"
position: 3250
position: 3300
category: "Engineering"
menuTitle: "Build on Pull Requests"
menuTitle: "Releases & Builds"
---
## Builds of NocoDB
There are 3 kinds of docker builds in NocoDB
- Release builds [nocodb/nocodb](https://hub.docker.com/r/nocodb/nocodb) : built during NocoDB release.
- Daily builds [nocodb/nocodb-daily](https://hub.docker.com/r/nocodb/nocodb-daily) : built every 6 hours from Develop branch.
- Daily builds [nocodb/nocodb-timely](https://hub.docker.com/r/nocodb/nocodb-timely): built for every PR.
NocoDB creates Docker and Binaries for each PR.
Below is an overview of how to make these builds and what happens behind the scenes.
## Release builds
### How to make a release build ?
- Click [NocoDB release action](https://github.com/nocodb/nocodb/actions/workflows/release-nocodb.yml)
- You should see the below screen
![image](https://user-images.githubusercontent.com/35857179/167240353-a02f690f-c865-4ade-8645-64382405c9ea.png)
- Change `Use workflow from` to `Branch: master`. If you choose the wrong branch, the workflow will be ended.
![image](https://user-images.githubusercontent.com/35857179/167240383-dda05f76-8323-4f4a-b3e7-9db886dbd68d.png)
- Then there would be two cases - you can either leave target tag and pervious tag blank or manually input some values
> Target Tag means the target deployment version, while Previous Tag means the latest version as of now. Previous Tag is used for Release Note only - showing the file / commit differences between two tags.
### Case 1: Leaving inputs blank
- If Previous Tag is blank, then the value will be fetched from [latest](https://github.com/nocodb/nocodb/releases/latest)
- If Target Tag is blank, then the value will be Previous Tag plus one. Example: 0.90.11 (Previous Tag) + 1 = 0.90.12 (Target Tag)
### Case 2: Manually Input
Why? Sometimes we may mess up in NPM deployment. As NPM doesn't allow us to redeploy to the same tag again, in this case we cannot just use the previous tag + 1. Therefore, we need to use previous tag + 2 instead and we manually configure it.
- After that, click `Run workflow` to start
- You can see Summary for the overall job status.
- Once `release-draft-note` and `release-executables` is finished, then go to [releases](https://github.com/nocodb/nocodb/releases), edit the draft note and save as draft for time being.
- Example: Adding header, update content if necessary, and click `Auto-generate release notes` to include more info.
- Once `release-docker` is finished, then test it locally first. You'll be expected to see `Upgrade Available` notification in UI as we haven't published the release note. (the version is retrieved from there)
- Once everything is finished, then publish the release note and the deployment is considered as DONE.
### How does release action work ?
#### validate-branch
To check if `github.ref` is master. Otherwise, other branches will be not accepted.
#### process-input
To enrich target tag or previous tag if necessary.
#### pr-to-master
Automate a PR from develop to master branch so that we know the actual differences between the previous tag and the current tag. We choose master branch for a deployment base.
#### release-npm
Build frontend and backend and release them to NPM. The changes during built such as version bumping will be committed and pushed to a temporary branch and an automated PR will be created and merged to master branch.
Note that once you publish with a certain tag, you cannot publish with the same tag again.
#### release-draft-note
Generate a draft release note. Some actions need to be done after this step.
#### release-docker
Build docker image and publish it to Docker Hub. It may take around 15 - 30 mins.
#### close-issues
Open issues marked with label `Status: Fixed` and `Status: Resolved` will be closed by bot automatically with comment mentioning the fix is included in which version.
Example:
![image](https://user-images.githubusercontent.com/35857179/167241574-f8f7061f-c689-444a-b761-0a727974c53f.png)
#### publish-docs
Publish Documentations
#### update-sdk-path
`nocodb-sdk` is used in frontend and backend. However, in develop branch, the value would be `file:../nocodb-sdk` for development purpose (so that the changes done in nocodb-sdk in develop will be included in frontend and backend). During the deployment, the value will be changed to the target tag. This job is to update them back.
#### sync-to-develop
Once the deployment is finished, there would be some new changes being pushed to master branch. This job is to sync the changes back to develop so that both branch won't have any difference.
## Daily builds
### What are daily builds ?
- NocoDB creates every 6 hours from develop branches and publishes as nocodb/nocodb-daily
- This is so that we can easily try what is in the develop branch easily.
### Docker images
- The docker images will be built and pushed to Docker Hub (See [nocodb/nocodb-daily](https://hub.docker.com/r/nocodb/nocodb-daily/tags) for the full list).
## Timely builds
### What are timely builds ?
NocoDB creates docker and binaries for each PR!
This is to
- reduce pull request cycle time
- allow issue reporters / reviewers to verify the fix without setting up their local machines
## Docker
### Docker images
When a non-draft Pull Request is created, reopened or synchronized, a timely build for Docker would be triggered for the changes only included in the following paths.
- `packages/nocodb-sdk/**`
- `packages/nc-gui/**`
- `packages/nc-plugin/**`
- `packages/nocodb/**`
The docker images will be built and pushed to Docker Hub (See [nocodb/nocodb-timely](https://hub.docker.com/r/nocodb/nocodb-timely/tags) for the full list). Once the image is ready, Github bot will add a comment with the command in the pull request. The tag would be `<NOCODB_CURRENT_VERSION>-pr-<PR_NUMBER>-<YYYYMMDD>-<HHMM>`.
The docker images will be built and pushed to Docker Hub (See [nocodb/nocodb-timely](https://hub.docker.com/r/nocodb/nocodb-timely/tags) for the full list). Once the image is ready, Github bot will add a comment with the command in the pull request. The tag would be `<NOCODB_CURRENT_VERSION>-pr-<PR_NUMBER>-<YYYYMMDD>-<HHMM>`.
![image](https://user-images.githubusercontent.com/35857179/178413534-84b29afb-7a52-437b-a5df-b842b397390b.png)
![image](https://user-images.githubusercontent.com/35857179/175012097-240dab05-da93-4c4e-87c1-1c36fb1350bd.png)
## Executables
## Executables or Binariess
Similarly, we provide a timely build for executables for non-docker users. The source code will be built, packaged as binary files, and pushed to Github (See [nocodb/nocodb-timely](https://github.com/nocodb/nocodb-timely/releases) for the full list).
Similarly, we provide a timely build for executables for non-docker users. The source code will be built, packaged as binary files, and pushed to Github (See [nocodb/nocodb-timely](https://github.com/nocodb/nocodb-timely/releases) for the full list).
Currently, we only support the following targets:
@ -38,6 +134,13 @@ Currently, we only support the following targets:
- `node16-macos-x64`
- `node16-win-x64`
Once the executables are ready, Github bot will add a comment with the commands in the pull request.
Once the executables are ready, Github bot will add a comment with the commands in the pull request.
![image](https://user-images.githubusercontent.com/35857179/175012070-f5f3e7b8-6dc5-4d1c-9f7e-654bc5039521.png)
NocoDB creates Docker and Binaries for each PR.
This is to
- reduce pull request cycle time
- allow issue reporters / reviewers to verify the fix without setting up their local machines
![image](https://user-images.githubusercontent.com/35857179/175012070-f5f3e7b8-6dc5-4d1c-9f7e-654bc5039521.png)

20
packages/noco-docs/content/en/engineering/development-setup.md

@ -6,13 +6,13 @@ category: "Engineering"
menuTitle: "Development setup"
---
### Clone the repo
## Clone the repo
```
git clone https://github.com/nocodb/nocodb
cd nocodb/packages
```
### Build SDK
## Build SDK
```
# build nocodb-sdk
cd nocodb-sdk
@ -20,7 +20,7 @@ npm install
npm run build
```
### Build Backend
## Build Backend
```
# build backend - runs on port 8080
cd ../nocodb
@ -28,7 +28,7 @@ npm install
npm run watch:run
```
### Build Frontend
## Build Frontend
```
# build frontend - runs on port 3000
cd ../nc-gui
@ -38,7 +38,7 @@ npm run dev
Any changes made to frontend and backend will be automatically reflected in the browser.
### Cypress
## Cypress - e2e tests
Cypress tests are divided into 4 suites
- SQLite tests
- Postgres tests
@ -52,7 +52,7 @@ First 3 suites, each have 4 test category
- Miscellaneous (Import, i18n, etc)
#### MySQL tests (ExtDB project)
### MySQL tests (ExtDB project)
```shell
# install dependencies(cypress)
npm install
@ -75,7 +75,7 @@ npm run cypress:open
- Miscellaneous : restMisc.js
```
#### SQLite tests (XCDB project)
### SQLite tests (XCDB project)
```shell
# install dependencies(cypress)
npm install
@ -98,7 +98,7 @@ npm run cypress:open
- Miscellaneous : xcdb-restMisc.js
```
#### PG tests (ExtDB project)
### PG tests (ExtDB project)
```shell
# install dependencies(cypress)
npm install
@ -121,7 +121,7 @@ npm run cypress:open
- Miscellaneous : pg-restMisc.js
```
#### Quick import tests (SQLite project)
### Quick import tests (SQLite project)
```shell
# install dependencies(cypress)
npm install
@ -144,7 +144,7 @@ npm run cypress:open
- quickTest.js
```
#### Quick import tests (PG)
### Quick import tests (PG)
```shell
# install dependencies(cypress)
npm install

178
packages/noco-docs/content/en/engineering/testing.md

@ -0,0 +1,178 @@
---
title: "Writing Tests"
description: "Overview to testing"
position: 3250
category: "Engineering"
menuTitle: "Testing"
---
## API Tests
### Pre-requisites
- MySQL is preferrable - however we fallback to SQLite
### Setup
```
cp scripts/.env.copy scripts/.env
open scripts/.env
# Edit the following env variables
# `DB_USER` : mysql username
# `DB_PASSWORD` : mysql password
# `DB_HOST` : mysql host
# `DB_PORT` : mysql port
```
### Running tests
```
cd packages/nocodb
npm run test:unit
```
### Notes
#### Key points
- All individual unit tests are independent of each other. We don't use any shared state between tests.
- Test environment includes `sakila` sample database and any change to it by a test is reverted before running other tests.
- While running unit tests, it tries to connect to mysql server running on `localhost:3306` with username `root` and password `password`(which can be configured) and if not found, it will use `sqlite` as a fallback, hence no requirement of any sql server to run tests.
#### Walk through of writing a unit test
We will create an `Table` test suite as an example.
##### Configure test
We will configure `beforeEach` which is called before each test is executed. We will use `init` function from `nocodb/packages/tests/unit/init/index.ts`, which is a helper function which configures the test environment(i.e resetting state, etc.).
`init` does the following things -
- It initializes a `Noco` instance(reused in all tests).
- Restores `meta` and `sakila` database to its initial state.
- Creates the root user.
- Returns `context` which has `auth token` for the created user, node server instance(`app`), and `dbConfig`.
We will use `createProject` and `createProject` factories to create a project and a table.
```typescript
let context;
beforeEach(async function () {
context = await init();
project = await createProject(context);
table = await createTable(context, project);
});
```
##### Test case
We will use `it` function to create a test case. We will use `supertest` to make a request to the server. We use `expect`(`chai`) to assert the response.
```typescript
it('Get table list', async function () {
const response = await request(context.app)
.get(`/api/v1/db/meta/projects/${project.id}/tables`)
.set('xc-auth', context.token)
.send({})
.expect(200);
expect(response.body.list).to.be.an('array').not.empty;
});
```
##### Integrating the new test suite
We create a new file `table.test.ts` in `packages/nocodb/tests/unit/rest/tests` directory.
```typescript
import 'mocha';
import request from 'supertest';
import init from '../../init';
import { createTable, getAllTables } from '../../factory/table';
import { createProject } from '../../factory/project';
import { defaultColumns } from '../../factory/column';
import Model from '../../../../src/lib/models/Model';
import { expect } from 'chai';
function tableTest() {
let context;
let project;
let table;
beforeEach(async function () {
context = await init();
project = await createProject(context);
table = await createTable(context, project);
});
it('Get table list', async function () {
const response = await request(context.app)
.get(`/api/v1/db/meta/projects/${project.id}/tables`)
.set('xc-auth', context.token)
.send({})
.expect(200);
expect(response.body.list).to.be.an('array').not.empty;
});
}
export default function () {
describe('Table', tableTests);
}
```
We can then import the `Table` test suite to `Rest` test suite in `packages/nocodb/tests/unit/rest/index.test.ts` file(`Rest` test suite is imported in the root test suite file which is `packages/nocodb/tests/unit/index.test.ts`).
#### Running test
To run tests, run `npm run test:unit` in `packages/nocodb` directory.
> NOTE: We can also run individual test by using `.only` in `describe` or `it` function and the running the test command.
```typescript
it.only('Get table list', async () => {
```
#### Folder structure
The root folder for unit tests is `packages/tests/unit`
- `rest` folder contains all the test suites for rest apis.
- `model` folder contains all the test suites for models.
- `factory` folder contains all the helper functions to create test data.
- `init` folder contains helper functions to configure test environment.
- `index.test.ts` is the root test suite file which imports all the test suites.
- `TestDbMngr.ts` is a helper class to manage test databases (i.e. creating, dropping, etc.).
#### Patterns to follow
- **Factories**
- Use factories for create/update/delete data. No data should be directly create/updated/deleted in the test.
- While writing a factory make sure that it can be used with as less parameters as possible and use default values for other parameters.
- Use named parameters for factories.
``` typescript
createUser({ email, password})
```
- Use one file per factory.
#### Using sakila db
To use sakila db use `createSakilaProject` from `factory/project` to create a project. This project will be seeded with `sakila` tables.
## Cypress Tests
### Pre-requisites
> TODO
### Setup
> TODO
### Running tests
> TODO
### Notes
> TODO

40
packages/noco-docs/content/en/engineering/translation.md

@ -6,12 +6,17 @@ category: "Engineering"
menuTitle: "i18n translation"
---
NocoDB supports many foreign languages & community contributions are now simplified via [Crowdin](https://crowdin.com/)
Your help in fixing i18n goes a long way supporting NocoDB. Please follow below simple procedure to request corrections to existing translation errors.
- NocoDB supports 30+ foreign languages & community contributions are now simplified via [Crowdin](https://crowdin.com/).
# Public Contributions
### 1. How to add translation corrections (to existing languages)?
## How to add / edit translations ?
### Using Github
- For English, make changes directly to [en.json](https://github.com/nocodb/nocodb/blob/develop/packages/nc-gui/lang/en.json) & commit to `develop`
- For any other language, use `crowdin` option.
### Using Crowdin
- Setup [Crowdin](https://crowdin.com) account
- Join [NocoDB](https://crowdin.com/project/nocodb) project
@ -33,10 +38,7 @@ Note: Crowdin provides translation recommendation's as in [4]. Click directly if
![Screenshot 2022-09-08 at 10 37 38 PM](https://user-images.githubusercontent.com/86527202/189184278-69d688ed-4e5a-4d5a-b629-9f6d10d79346.png)
A GitHub Pull Request will be automatically triggered (periodicity- 6 hours). We will follup on remaining integration work items.
---
A GitHub Pull Request will be automatically triggered (periodicity- 6 hours). We will follow up on remaining integration work items.
#### Reference
@ -45,26 +47,9 @@ Refer following articles to get additional details about Crowdin Portal usage
- [Volunteer Translation Introduction](https://support.crowdin.com/for-volunteer-translators/)
- [Online Editor](https://support.crowdin.com/online-editor/)
---
### 2. How to add a new language ?
Your native language not in list, we will be glad to support with your help! Request for it [here](https://github.com/nocodb/nocodb/issues/new?assignees=dstala&labels=i18n+translation&template=i18n-translation-request.md&title=%5Bi18n%5D+Language+support+extension-+%3Clanguage+code%3E). We will be glad to take your help to set up translations
---
# Engineering Contributions (for NocoDB developers & maintainers)
> _This is exclusive to NocoDB developers & maintainers only_
### 1. Adding / Updating a string
### Add / update key-value
- [en] make changes directly to `en.json` & commit to `develop`
- [any other language] add changes using `crowdin` portal; procedure described below
### Add a new language
## How to add a new language ?
#### GitHub changes
- Update enumeration in `enums.ts` [packages/nc-gui/lib/enums.ts]
- Map JSON path in `a.i18n.ts` [packages/nc-gui/plugins/a.i18n.ts]
@ -80,9 +65,8 @@ Your native language not in list, we will be glad to support with your help! Req
![Screenshot 2022-09-08 at 10 54 04 PM](https://user-images.githubusercontent.com/86527202/189186632-0b9f5f55-0550-4d8f-a8ae-7e9b9076774e.png)
---
### 2. String Categories
## String Categories
- **General**: simple & common tokens (save, cancel, submit, open, close, home, and such)
- **Objects**: objects from NocoDB POV (project, table, field, column, view, page, and such)
- **Title**: screen headers (compact) (menu headers, modal headers)

189
packages/noco-docs/content/en/getting-started/installation.md

@ -10,17 +10,11 @@ link: https://codesandbox.io/embed/vigorous-firefly-80kq5?hidenavigation=1&theme
Simple installation - takes about three minutes!
## Prerequisites
- Must haves
- [Node.js with version >= 14](https://nodejs.org/en/download) / [Docker](https://www.docker.com/get-started)
- Nice to haves
- [MySQL](https://dev.mysql.com/downloads/mysql/) / [Postgres](https://www.postgresql.org/download/) / [SQL Server](https://www.microsoft.com/en-gb/sql-server/sql-server-downloads) / SQLite Database
- Existing schemas can help to create APIs quickly.
- An example database schema can be found <a class="grey--text" href="https://github.com/lerocha/chinook-database/tree/master/ChinookDatabase/DataSources"> <u>here</u></a>.
- [Docker](https://www.docker.com/get-started) or [Node.js](https://nodejs.org/en/download) ( > v14.x )
## Quick try
### 1-Click Deploy to Heroku
### Heroku
Before doing so, make sure you have a Heroku account. By default, an add-on Heroku Postgres will be used as meta database. You can see the connection string defined in `DATABASE_URL` by navigating to Heroku App Settings and selecting Config Vars.
@ -32,88 +26,7 @@ Before doing so, make sure you have a Heroku account. By default, an add-on Hero
/>
</a>
### NPX
You can run below command if you need an interactive configuration.
```bash
npx create-nocodb-app
```
#### Preview:
<img width="587" alt="image" src="https://user-images.githubusercontent.com/35857179/161526235-5ee0d592-0105-4a57-aa53-b1048dca6aad.png">
### Node Application
We provide a simple NodeJS Application for getting started.
```bash
git clone https://github.com/nocodb/nocodb-seed
cd nocodb-seed
npm install
npm start
```
### Homebrew
```bash
brew tap nocodb/nocodb
brew install nocodb
nocodb
```
### Executables
You can download executables directly and run without any extra dependancy. Use the right command based on your platform.
##### MacOS (x64)
```bash
curl http://get.nocodb.com/macos-x64 -o nocodb -L \
&& chmod +x nocodb \
&& ./nocodb
```
##### MacOS (arm64)
```bash
curl http://get.nocodb.com/macos-arm64 -o nocodb -L \
&& chmod +x nocodb \
&& ./nocodb
```
##### Linux (x64)
```bash
curl http://get.nocodb.com/linux-x64 -o nocodb -L \
&& chmod +x nocodb \
&& ./nocodb
```
##### Linux (arm64)
```bash
curl http://get.nocodb.com/linux-arm64 -o nocodb -L \
&& chmod +x nocodb \
&& ./nocodb
```
##### Windows (x64)
```bash
iwr http://get.nocodb.com/win-x64.exe
.\Noco-win-x64.exe
```
##### Windows (arm64)
```bash
iwr http://get.nocodb.com/win-arm64.exe
.\Noco-win-arm64.exe
```
### Docker
### Docker
If you are a Docker user, you may try this way!
@ -126,7 +39,7 @@ If you are a Docker user, you may try this way!
-p 8080:8080 \
nocodb/nocodb:latest
```
</code-block>
<code-block label="MySQL">
@ -139,7 +52,7 @@ If you are a Docker user, you may try this way!
-e NC_AUTH_JWT_SECRET="569a1821-0a93-45e8-87ab-eb857f20a010" \
nocodb/nocodb:latest
```
</code-block>
<code-block label="Postgres">
@ -183,7 +96,7 @@ We provide different docker-compose.yml files under <a href="https://github.com/
<code-group>
<code-block label="MySQL" active>
```bash
git clone https://github.com/nocodb/nocodb
cd nocodb/docker-compose/mysql
@ -201,7 +114,7 @@ We provide different docker-compose.yml files under <a href="https://github.com/
```
</code-block>
<code-block label="SQL Server">
```bash
@ -221,6 +134,91 @@ Tip 1: To persist data in docker you can mount volume at `/usr/app/data/` since
Tip 2: If you plan to input some special characters, you may need to change the character set and collation yourself when creating the database. Please check out the examples for <a href="https://github.com/nocodb/nocodb/issues/1313#issuecomment-1046625974" target="_blank">MySQL Docker Compose</a>.
</alert>
### NPX
You can run below command if you need an interactive configuration.
```bash
npx create-nocodb-app
```
#### Preview:
<img width="587" alt="image" src="https://user-images.githubusercontent.com/35857179/161526235-5ee0d592-0105-4a57-aa53-b1048dca6aad.png">
### Homebrew
```bash
brew tap nocodb/nocodb
brew install nocodb
nocodb
```
### Executables
You can download executables directly and run without any extra dependancy. Use the right command based on your platform.
##### MacOS (x64)
```bash
curl http://get.nocodb.com/macos-x64 -o nocodb -L \
&& chmod +x nocodb \
&& ./nocodb
```
##### MacOS (arm64)
```bash
curl http://get.nocodb.com/macos-arm64 -o nocodb -L \
&& chmod +x nocodb \
&& ./nocodb
```
##### Linux (x64)
```bash
curl http://get.nocodb.com/linux-x64 -o nocodb -L \
&& chmod +x nocodb \
&& ./nocodb
```
##### Linux (arm64)
```bash
curl http://get.nocodb.com/linux-arm64 -o nocodb -L \
&& chmod +x nocodb \
&& ./nocodb
```
##### Windows (x64)
```bash
iwr http://get.nocodb.com/win-x64.exe
.\Noco-win-x64.exe
```
##### Windows (arm64)
```bash
iwr http://get.nocodb.com/win-arm64.exe
.\Noco-win-arm64.exe
```
### Node Application
We provide a simple NodeJS Application for getting started.
```bash
git clone https://github.com/nocodb/nocodb-seed
cd nocodb-seed
npm install
npm start
```
## Production Setup
It is mandatory to configure `NC_DB` environment variables for production usecases.
@ -366,9 +364,6 @@ aws ecs create-service \
If your service fails to start, you may check the logs in ECS console or in Cloudwatch. Generally it fails due to the connection between ECS container and NC_DB. Make sure the security groups have the correct inbound and outbound rules.
</alert>
## Development Setup
Please refer to [Development Setup](https://docs-dev.nocodb.com/engineering/development-setup).
## Sample Demos
### Code Sandbox

14
packages/nocodb/src/lib/meta/api/metaDiffApis.ts

@ -34,6 +34,11 @@ export enum MetaDiffType {
TABLE_VIRTUAL_M2M_REMOVE = 'TABLE_VIRTUAL_M2M_REMOVE',
}
const applyChangesPriorityOrder = [
MetaDiffType.VIEW_COLUMN_REMOVE,
MetaDiffType.TABLE_RELATION_REMOVE,
];
type MetaDiff = {
title?: string;
table_name: string;
@ -549,6 +554,15 @@ export async function metaDiffSync(req, res) {
// const relations = (await sqlClient.relationListAll())?.data?.list;
for (const { table_name, detectedChanges } of changes) {
// reorder changes to apply relation remove changes
// before column remove to avoid foreign key constraint error
detectedChanges.sort((a, b) => {
return (
applyChangesPriorityOrder.indexOf(b.type) -
applyChangesPriorityOrder.indexOf(a.type)
);
});
for (const change of detectedChanges) {
switch (change.type) {
case MetaDiffType.TABLE_NEW:

22
packages/nocodb/src/lib/models/Column.ts

@ -772,6 +772,28 @@ export default class Column<T = any> implements ColumnType {
await NocoCache.del(`${CacheScope.GALLERY_VIEW_COLUMN}:${col.id}`);
}
// Get LTAR columns in which current column is referenced as foreign key
const ltarColumns = await ncMeta.metaList2(
null,
null,
MetaTable.COL_RELATIONS,
{
xcCondition: {
_or: [
{ fk_child_column_id: { eq: col.id } },
{ fk_parent_column_id: { eq: col.id } },
{ fk_mm_child_column_id: { eq: col.id } },
{ fk_mm_parent_column_id: { eq: col.id } },
],
},
}
);
// Delete LTAR columns in which current column is referenced as foreign key
for (const ltarColumn of ltarColumns) {
await Column.delete(ltarColumn.fk_column_id, ncMeta);
}
// Columns
await ncMeta.metaDelete(null, null, MetaTable.COLUMNS, col.id);
await NocoCache.deepDel(

0
packages/nocodb/tests/unit/.env

4
packages/nocodb/tests/unit/rest/tests/table.test.ts

@ -1,4 +1,3 @@
// import { expect } from 'chai';
import 'mocha';
import request from 'supertest';
import init from '../../init';
@ -6,6 +5,7 @@ import { createTable, getAllTables } from '../../factory/table';
import { createProject } from '../../factory/project';
import { defaultColumns } from '../../factory/column';
import Model from '../../../../src/lib/models/Model';
import { expect } from 'chai';
function tableTest() {
let context;
@ -26,7 +26,7 @@ function tableTest() {
.send({})
.expect(200);
if (response.body.list.length !== 1) return new Error('Wrong number of tables');
expect(response.body.list).to.be.an('array').not.empty;
});
it('Create table', async function () {

Loading…
Cancel
Save