UNPKG

@rsc-labs/medusa-documents

Version:
47 lines (46 loc) 2.01 kB
"use strict"; /* * Copyright 2024 RSC-Labs, https://rsoftcon.com/ * * MIT License * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.DocumentSettings1711700828113 = void 0; const typeorm_1 = require("typeorm"); class DocumentSettings1711700828113 { constructor() { this.name = 'DocumentSettings1711700828113'; } async up(queryRunner) { await queryRunner.createTable(new typeorm_1.Table({ name: 'document_settings', columns: [ { name: 'id', type: 'character varying', isPrimary: true }, { name: 'store_address', type: 'character varying', isNullable: true }, { name: 'store_logo_source', type: 'character varying', isNullable: true }, { name: 'invoice_number_format', type: 'character varying', isNullable: true }, { name: 'invoice_template', type: 'character varying', isNullable: true }, { name: 'created_at', type: 'TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now()' }, { name: 'updated_at', type: 'TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now()' }, { name: 'deleted_at', type: 'TIMESTAMP WITH TIME ZONE', isNullable: true } ], foreignKeys: [ { columnNames: ['store_address'], referencedColumnNames: ['id'], referencedTableName: 'public.address', } ] }), true); } async down(queryRunner) { await queryRunner.dropTable('document_settings', true); } } exports.DocumentSettings1711700828113 = DocumentSettings1711700828113;