get subscription in admin
This commit is contained in:
@@ -1,4 +1,9 @@
|
||||
import { MigrationInterface, QueryRunner, Table, TableForeignKey } from 'typeorm';
|
||||
import {
|
||||
MigrationInterface,
|
||||
QueryRunner,
|
||||
Table,
|
||||
TableForeignKey,
|
||||
} from 'typeorm';
|
||||
|
||||
export class InitialSchema1719600000000 implements MigrationInterface {
|
||||
name = 'InitialSchema1719600000000';
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
import { MigrationInterface, QueryRunner, Table, TableForeignKey } from 'typeorm';
|
||||
import {
|
||||
MigrationInterface,
|
||||
QueryRunner,
|
||||
Table,
|
||||
TableForeignKey,
|
||||
} from 'typeorm';
|
||||
|
||||
export class AddStylists1719700000000 implements MigrationInterface {
|
||||
name = 'AddStylists1719700000000';
|
||||
@@ -17,7 +22,12 @@ export class AddStylists1719700000000 implements MigrationInterface {
|
||||
},
|
||||
{ name: 'salonId', type: 'uuid' },
|
||||
{ name: 'userId', type: 'uuid', isUnique: true },
|
||||
{ name: 'avatarUrl', type: 'varchar', length: '500', isNullable: true },
|
||||
{
|
||||
name: 'avatarUrl',
|
||||
type: 'varchar',
|
||||
length: '500',
|
||||
isNullable: true,
|
||||
},
|
||||
{ name: 'experienceYears', type: 'int', default: 0 },
|
||||
{ name: 'createdAt', type: 'timestamp', default: 'now()' },
|
||||
{ name: 'updatedAt', type: 'timestamp', default: 'now()' },
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
import { MigrationInterface, QueryRunner, Table, TableForeignKey } from 'typeorm';
|
||||
import {
|
||||
MigrationInterface,
|
||||
QueryRunner,
|
||||
Table,
|
||||
TableForeignKey,
|
||||
} from 'typeorm';
|
||||
|
||||
export class AddServices1719800000000 implements MigrationInterface {
|
||||
name = 'AddServices1719800000000';
|
||||
@@ -17,7 +22,12 @@ export class AddServices1719800000000 implements MigrationInterface {
|
||||
},
|
||||
{ name: 'title', type: 'varchar', length: '200' },
|
||||
{ name: 'iconUrl', type: 'varchar', length: '500', isNullable: true },
|
||||
{ name: 'coverUrl', type: 'varchar', length: '500', isNullable: true },
|
||||
{
|
||||
name: 'coverUrl',
|
||||
type: 'varchar',
|
||||
length: '500',
|
||||
isNullable: true,
|
||||
},
|
||||
{ name: 'createdAt', type: 'timestamp', default: 'now()' },
|
||||
{ name: 'updatedAt', type: 'timestamp', default: 'now()' },
|
||||
],
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
import {
|
||||
MigrationInterface,
|
||||
QueryRunner,
|
||||
Table,
|
||||
TableIndex,
|
||||
} from 'typeorm';
|
||||
import { MigrationInterface, QueryRunner, Table, TableIndex } from 'typeorm';
|
||||
|
||||
export class AddSmsTemplates1720100000000 implements MigrationInterface {
|
||||
name = 'AddSmsTemplates1720100000000';
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
import { MigrationInterface, QueryRunner, TableForeignKey, TableIndex } from 'typeorm';
|
||||
import {
|
||||
MigrationInterface,
|
||||
QueryRunner,
|
||||
TableForeignKey,
|
||||
TableIndex,
|
||||
} from 'typeorm';
|
||||
|
||||
export class ExtendPaymentsForSubscriptions1720700000000
|
||||
implements MigrationInterface
|
||||
{
|
||||
export class ExtendPaymentsForSubscriptions1720700000000 implements MigrationInterface {
|
||||
name = 'ExtendPaymentsForSubscriptions1720700000000';
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
|
||||
@@ -7,9 +7,7 @@ import {
|
||||
TableUnique,
|
||||
} from 'typeorm';
|
||||
|
||||
export class MoveSuggestionsToServiceSkill1720900000000
|
||||
implements MigrationInterface
|
||||
{
|
||||
export class MoveSuggestionsToServiceSkill1720900000000 implements MigrationInterface {
|
||||
name = 'MoveSuggestionsToServiceSkill1720900000000';
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
@@ -26,7 +24,10 @@ export class MoveSuggestionsToServiceSkill1720900000000
|
||||
fk.columnNames.includes('suggestedServiceId'),
|
||||
);
|
||||
if (suggestedServiceFk) {
|
||||
await queryRunner.dropForeignKey('service_suggestions', suggestedServiceFk);
|
||||
await queryRunner.dropForeignKey(
|
||||
'service_suggestions',
|
||||
suggestedServiceFk,
|
||||
);
|
||||
}
|
||||
|
||||
const uniqueConstraints = table?.uniques ?? [];
|
||||
@@ -36,7 +37,10 @@ export class MoveSuggestionsToServiceSkill1720900000000
|
||||
|
||||
const indexes = table?.indices ?? [];
|
||||
for (const index of indexes) {
|
||||
if (index.columnNames.includes('serviceId') || index.columnNames.includes('serviceSkillId')) {
|
||||
if (
|
||||
index.columnNames.includes('serviceId') ||
|
||||
index.columnNames.includes('serviceSkillId')
|
||||
) {
|
||||
await queryRunner.dropIndex('service_suggestions', index);
|
||||
}
|
||||
}
|
||||
@@ -128,7 +132,10 @@ export class MoveSuggestionsToServiceSkill1720900000000
|
||||
'IDX_service_suggestions_serviceSkillId_isActive_displayPriority',
|
||||
);
|
||||
await queryRunner.dropColumn('service_suggestions', 'serviceSkillId');
|
||||
await queryRunner.dropColumn('service_suggestions', 'suggestedServiceSkillId');
|
||||
await queryRunner.dropColumn(
|
||||
'service_suggestions',
|
||||
'suggestedServiceSkillId',
|
||||
);
|
||||
|
||||
await queryRunner.addColumn(
|
||||
'service_suggestions',
|
||||
|
||||
Reference in New Issue
Block a user