@nina-protocol/nina-db 0.0.90 → 0.0.92
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/package.json +1 -1
- package/src/knexfile.js +38 -3
- package/src/migrations/20250423215722_hubs_collaborators_permissions.js +21 -0
- package/src/migrations/20250424215722_hubs_collaborators_added_by.js +19 -0
- package/yarn-error.log +6817 -0
- package/dist/index.js +0 -30
- package/dist/knexfile.js +0 -43
- package/dist/migrations/20220815134115_initial_migration.js +0 -211
- package/dist/migrations/20220930214430_add_subscriptions.js +0 -23
- package/dist/migrations/20221010170539_add_hub_data_uri.js +0 -15
- package/dist/migrations/20221010185734_add_transactions.js +0 -58
- package/dist/migrations/20221012230835_add_verifications.js +0 -31
- package/dist/migrations/20221201221013_add_hub_releases_visible.js +0 -15
- package/dist/migrations/20221206184748_add_gate.js +0 -29
- package/dist/migrations/20230104184351_add_verification_active.js +0 -15
- package/dist/migrations/20230306215838_add_hub_updated_at.js +0 -15
- package/dist/migrations/20231011163511_add_release_slug.js +0 -15
- package/dist/migrations/20231031200532_add_profile.js +0 -18
- package/dist/migrations/20231112031914_post_version.js +0 -15
- package/dist/migrations/20231116215117_add_tags.js +0 -40
- package/dist/migrations/20240131143626_release_price.js +0 -16
- package/dist/migrations/20240304143626_fix_tags_content.js +0 -31
- package/dist/migrations/20240321155034_hide_release.js +0 -15
- package/dist/migrations/20240821155034_release_hidden_to_archived.js +0 -18
- package/dist/migrations/20241121155034_subscription_public_key_nullable.js +0 -15
- package/dist/migrations/20250120215722_add_ref_columns.js +0 -18
- package/dist/models/Account.js +0 -122
- package/dist/models/Exchange.js +0 -62
- package/dist/models/Hub.js +0 -86
- package/dist/models/Post.js +0 -84
- package/dist/models/Release.js +0 -282
- package/dist/models/Subscription.js +0 -57
- package/dist/models/Tag.js +0 -39
- package/dist/models/TagsReleases.js +0 -17
- package/dist/models/Transaction.js +0 -148
- package/dist/models/Verification.js +0 -50
- package/dist/models/index.js +0 -21
- package/dist/seeds/1_accounts_profile.js +0 -22
- package/dist/utils/index.js +0 -45
package/package.json
CHANGED
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
|
-
|
|
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,19 @@
|
|
|
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.string('added_by');
|
|
8
|
+
});
|
|
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('added_by');
|
|
18
|
+
});
|
|
19
|
+
};
|