@nina-protocol/nina-db 0.0.90 → 0.0.91

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/knexfile.js CHANGED
@@ -14,6 +14,15 @@ export default {
14
14
  migrations: {
15
15
  directory: './node_modules/@nina-protocol/nina-db/dist/migrations',
16
16
  },
17
+ auth: {
18
+ client: 'postgresql',
19
+ connection: {
20
+ host: process.env.AUTH_DB_HOST,
21
+ user: process.env.AUTH_USER,
22
+ password: process.env.AUTH_PASSWORD,
23
+ database: process.env.AUTH_DB_NAME
24
+ }
25
+ }
17
26
  },
18
27
  staging: {
19
28
  client: 'postgresql',
@@ -26,6 +35,15 @@ export default {
26
35
  migrations: {
27
36
  directory: './node_modules/@nina-protocol/nina-db/dist/migrations',
28
37
  },
38
+ auth: {
39
+ client: 'postgresql',
40
+ connection: {
41
+ host: process.env.AUTH_DB_HOST,
42
+ user: process.env.AUTH_USER,
43
+ password: process.env.AUTH_PASSWORD,
44
+ database: process.env.AUTH_DB_NAME
45
+ }
46
+ }
29
47
  },
30
48
  production: {
31
49
  client: 'postgresql',
@@ -38,6 +56,23 @@ export default {
38
56
  migrations: {
39
57
  directory: './node_modules/@nina-protocol/nina-db/dist/migrations',
40
58
  },
41
- debug: true,
59
+ auth: {
60
+ client: 'postgresql',
61
+ connection: {
62
+ host: process.env.AUTH_DB_HOST,
63
+ user: process.env.AUTH_USER,
64
+ password: process.env.AUTH_PASSWORD,
65
+ database: process.env.AUTH_DB_NAME
66
+ }
67
+ }
68
+ },
69
+ knexAuthDB: {
70
+ client: 'postgresql',
71
+ connection: {
72
+ host: process.env.AUTH_DB_HOST,
73
+ user: process.env.AUTH_USER,
74
+ password: process.env.AUTH_PASSWORD,
75
+ database: process.env.AUTH_DB_NAME
76
+ }
42
77
  }
43
78
  };
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @param { import("knex").Knex } knex
3
+ * @returns { Promise<void> }
4
+ */
5
+ export const up = function (knex) {
6
+ return knex.schema.table('hubs_collaborators', table => {
7
+ table.boolean('can_add_content').defaultTo(true);
8
+ table.boolean('can_add_collaborators').defaultTo(true);
9
+ });
10
+ };
11
+ /**
12
+ * @param { import("knex").Knex } knex
13
+ * @returns { Promise<void> }
14
+ */
15
+ export const down = function (knex) {
16
+ return knex.schema.table('hubs_collaborators', table => {
17
+ table.dropColumn('can_add_content');
18
+ table.dropColumn('can_add_collaborators');
19
+ });
20
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nina-protocol/nina-db",
3
- "version": "0.0.90",
3
+ "version": "0.0.91",
4
4
  "description": "",
5
5
  "source": "src/index.js",
6
6
  "main": "dist/index.js",
package/src/knexfile.js CHANGED
@@ -2,8 +2,8 @@
2
2
  * @type { Object.<string, import("knex").Knex.Config> }
3
3
  */
4
4
  import "dotenv/config.js";
5
- export default {
6
5
 
6
+ export default {
7
7
  development: {
8
8
  client: 'postgresql',
9
9
  connection: {
@@ -15,6 +15,15 @@ export default {
15
15
  migrations: {
16
16
  directory: './node_modules/@nina-protocol/nina-db/dist/migrations',
17
17
  },
18
+ auth: {
19
+ client: 'postgresql',
20
+ connection: {
21
+ host: process.env.AUTH_DB_HOST,
22
+ user: process.env.AUTH_USER,
23
+ password: process.env.AUTH_PASSWORD,
24
+ database: process.env.AUTH_DB_NAME
25
+ }
26
+ }
18
27
  },
19
28
  staging: {
20
29
  client: 'postgresql',
@@ -27,6 +36,15 @@ export default {
27
36
  migrations: {
28
37
  directory: './node_modules/@nina-protocol/nina-db/dist/migrations',
29
38
  },
39
+ auth: {
40
+ client: 'postgresql',
41
+ connection: {
42
+ host: process.env.AUTH_DB_HOST,
43
+ user: process.env.AUTH_USER,
44
+ password: process.env.AUTH_PASSWORD,
45
+ database: process.env.AUTH_DB_NAME
46
+ }
47
+ }
30
48
  },
31
49
  production: {
32
50
  client: 'postgresql',
@@ -39,6 +57,23 @@ export default {
39
57
  migrations: {
40
58
  directory: './node_modules/@nina-protocol/nina-db/dist/migrations',
41
59
  },
42
- debug: true,
60
+ auth: {
61
+ client: 'postgresql',
62
+ connection: {
63
+ host: process.env.AUTH_DB_HOST,
64
+ user: process.env.AUTH_USER,
65
+ password: process.env.AUTH_PASSWORD,
66
+ database: process.env.AUTH_DB_NAME
67
+ }
68
+ }
69
+ },
70
+ knexAuthDB: {
71
+ client: 'postgresql',
72
+ connection: {
73
+ host: process.env.AUTH_DB_HOST,
74
+ user: process.env.AUTH_USER,
75
+ password: process.env.AUTH_PASSWORD,
76
+ database: process.env.AUTH_DB_NAME
77
+ }
43
78
  }
44
- };
79
+ };
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @param { import("knex").Knex } knex
3
+ * @returns { Promise<void> }
4
+ */
5
+ export const up = function(knex) {
6
+ return knex.schema.table('hubs_collaborators', table => {
7
+ table.boolean('can_add_content').defaultTo(true);
8
+ table.boolean('can_add_collaborators').defaultTo(true);
9
+ });
10
+ };
11
+
12
+ /**
13
+ * @param { import("knex").Knex } knex
14
+ * @returns { Promise<void> }
15
+ */
16
+ export const down = function(knex) {
17
+ return knex.schema.table('hubs_collaborators', table => {
18
+ table.dropColumn('can_add_content');
19
+ table.dropColumn('can_add_collaborators');
20
+ });
21
+ };
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @param { import("knex").Knex } knex
3
+ * @returns { Promise<void> }
4
+ */
5
+ exports.up = function(knex) {
6
+
7
+ };
8
+
9
+ /**
10
+ * @param { import("knex").Knex } knex
11
+ * @returns { Promise<void> }
12
+ */
13
+ exports.down = function(knex) {
14
+
15
+ };
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @param { import("knex").Knex } knex
3
+ * @returns { Promise<void> }
4
+ */
5
+ exports.up = function(knex) {
6
+
7
+ };
8
+
9
+ /**
10
+ * @param { import("knex").Knex } knex
11
+ * @returns { Promise<void> }
12
+ */
13
+ exports.down = function(knex) {
14
+
15
+ };
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @param { import("knex").Knex } knex
3
+ * @returns { Promise<void> }
4
+ */
5
+ exports.up = function(knex) {
6
+
7
+ };
8
+
9
+ /**
10
+ * @param { import("knex").Knex } knex
11
+ * @returns { Promise<void> }
12
+ */
13
+ exports.down = function(knex) {
14
+
15
+ };
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @param { import("knex").Knex } knex
3
+ * @returns { Promise<void> }
4
+ */
5
+ exports.up = function(knex) {
6
+
7
+ };
8
+
9
+ /**
10
+ * @param { import("knex").Knex } knex
11
+ * @returns { Promise<void> }
12
+ */
13
+ exports.down = function(knex) {
14
+
15
+ };
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @param { import("knex").Knex } knex
3
+ * @returns { Promise<void> }
4
+ */
5
+ exports.up = function(knex) {
6
+
7
+ };
8
+
9
+ /**
10
+ * @param { import("knex").Knex } knex
11
+ * @returns { Promise<void> }
12
+ */
13
+ exports.down = function(knex) {
14
+
15
+ };