@trafficgroup/knex-rel 0.0.24 → 0.0.25

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,6 +3,8 @@ export interface IUserPushNotificationToken {
3
3
  userId: number;
4
4
  token: string;
5
5
  available: boolean;
6
+ token_type: 'expo' | 'native';
7
+ device_type?: string;
6
8
  created_at: string;
7
9
  updated_at: string;
8
10
  }
@@ -0,0 +1,18 @@
1
+ import type { Knex } from "knex";
2
+
3
+
4
+ export async function up(knex: Knex): Promise<void> {
5
+ await knex.schema.alterTable('user_push_notification_token', (table) => {
6
+ table.string('token_type').defaultTo('expo').notNullable();
7
+ table.string('device_type');
8
+ });
9
+ }
10
+
11
+
12
+ export async function down(knex: Knex): Promise<void> {
13
+ await knex.schema.alterTable('user_push_notification_token', (table) => {
14
+ table.dropColumn('token_type');
15
+ table.dropColumn('device_type');
16
+ });
17
+ }
18
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trafficgroup/knex-rel",
3
- "version": "0.0.24",
3
+ "version": "0.0.25",
4
4
  "description": "Knex Module",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -3,6 +3,8 @@ export interface IUserPushNotificationToken {
3
3
  userId: number;
4
4
  token: string;
5
5
  available: boolean;
6
+ token_type: 'expo' | 'native';
7
+ device_type?: string;
6
8
  created_at: string;
7
9
  updated_at: string;
8
10
  }