@nina-protocol/nina-db 0.0.38 → 0.0.40

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.
@@ -3,7 +3,7 @@
3
3
  * @returns { Promise<void> }
4
4
  */
5
5
  export const up = function (knex) {
6
- return knex.schema.table('account', table => {
6
+ return knex.schema.table('accounts', table => {
7
7
  table.string('image');
8
8
  table.string('description');
9
9
  table.string('displayName');
@@ -124,7 +124,7 @@ export default class Release extends Model {
124
124
  return slug;
125
125
  };
126
126
  format = async () => {
127
- const publisher = await this.$relatedQuery('publisher').select('publicKey');
127
+ const publisher = await this.$relatedQuery('publisher');
128
128
  const publishedThroughHub = await this.$relatedQuery('publishedThroughHub');
129
129
  if (publishedThroughHub) {
130
130
  this.publishedThroughHub = publishedThroughHub.publicKey;
@@ -135,6 +135,7 @@ export default class Release extends Model {
135
135
  delete this.hub.authorityId;
136
136
  }
137
137
  this.publisher = publisher.publicKey;
138
+ this.publisherAccount = publisher;
138
139
  delete this.publisherId;
139
140
  delete this.hubId;
140
141
  delete this.id;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nina-protocol/nina-db",
3
- "version": "0.0.38",
3
+ "version": "0.0.40",
4
4
  "description": "",
5
5
  "source": "src/index.js",
6
6
  "main": "dist/index.js",
@@ -3,7 +3,7 @@
3
3
  * @returns { Promise<void> }
4
4
  */
5
5
  export const up = function(knex) {
6
- return knex.schema.table('account' , table => {
6
+ return knex.schema.table('accounts' , table => {
7
7
  table.string('image');
8
8
  table.string('description');
9
9
  table.string('displayName');
@@ -137,7 +137,7 @@ export default class Release extends Model {
137
137
  }
138
138
 
139
139
  format = async () => {
140
- const publisher = await this.$relatedQuery('publisher').select('publicKey');
140
+ const publisher = await this.$relatedQuery('publisher');
141
141
  const publishedThroughHub = await this.$relatedQuery('publishedThroughHub');
142
142
  if (publishedThroughHub) {
143
143
  this.publishedThroughHub = publishedThroughHub.publicKey;
@@ -148,6 +148,7 @@ export default class Release extends Model {
148
148
  delete this.hub.authorityId;
149
149
  }
150
150
  this.publisher = publisher.publicKey;
151
+ this.publisherAccount = publisher;
151
152
  delete this.publisherId
152
153
  delete this.hubId
153
154
  delete this.id