@nina-protocol/nina-db 0.0.37 → 0.0.38

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.
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @param { import("knex").Knex } knex
3
+ * @returns { Promise<void> }
4
+ */
5
+ export const up = function (knex) {
6
+ return knex.schema.table('account', table => {
7
+ table.string('image');
8
+ table.string('description');
9
+ table.string('displayName');
10
+ table.string('handle');
11
+ });
12
+ };
13
+ /**
14
+ * @param { import("knex").Knex } knex
15
+ * @returns { Promise<void> }
16
+ */
17
+ export const down = function (knex) {
18
+ };
@@ -12,6 +12,10 @@ export default class Account extends Model {
12
12
  required: ['publicKey'],
13
13
  properties: {
14
14
  publicKey: { type: 'string' },
15
+ image: { type: 'string' },
16
+ description: { type: 'string' },
17
+ displayName: { type: 'string' },
18
+ handle: { type: 'string' },
15
19
  },
16
20
  };
17
21
  static findOrCreate = async (publicKey) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nina-protocol/nina-db",
3
- "version": "0.0.37",
3
+ "version": "0.0.38",
4
4
  "description": "",
5
5
  "source": "src/index.js",
6
6
  "main": "dist/index.js",
@@ -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('account' , table => {
7
+ table.string('image');
8
+ table.string('description');
9
+ table.string('displayName');
10
+ table.string('handle');
11
+ });
12
+ };
13
+
14
+ /**
15
+ * @param { import("knex").Knex } knex
16
+ * @returns { Promise<void> }
17
+ */
18
+ export const down = function(knex) {
19
+
20
+ };
@@ -15,6 +15,10 @@ export default class Account extends Model {
15
15
  required: ['publicKey'],
16
16
  properties: {
17
17
  publicKey: { type: 'string' },
18
+ image: { type: 'string' },
19
+ description: { type: 'string' },
20
+ displayName: { type: 'string' },
21
+ handle: { type: 'string' },
18
22
  },
19
23
  }
20
24