mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-20 14:50:32 +00:00
feat: seed initial standard branding templates
This commit is contained in:
@@ -9,6 +9,8 @@ exports.up = function (knex) {
|
|||||||
table.text('resource');
|
table.text('resource');
|
||||||
table.text('template_name');
|
table.text('template_name');
|
||||||
table.json('attributes');
|
table.json('attributes');
|
||||||
|
table.boolean('predefined').defaultTo(false);
|
||||||
|
table.boolean('default').defaultTo(false);
|
||||||
table.timestamps();
|
table.timestamps();
|
||||||
})
|
})
|
||||||
.table('sales_invoices', (table) => {
|
.table('sales_invoices', (table) => {
|
||||||
|
|||||||
@@ -0,0 +1,44 @@
|
|||||||
|
/**
|
||||||
|
* @param { import("knex").Knex } knex
|
||||||
|
* @returns { Promise<void> }
|
||||||
|
*/
|
||||||
|
exports.up = function (knex) {
|
||||||
|
return knex('pdf_templates').insert([
|
||||||
|
{
|
||||||
|
resource: 'SaleInvoice',
|
||||||
|
templateName: 'Standard Template',
|
||||||
|
predefined: true,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
resource: 'SaleEstimate',
|
||||||
|
templateName: 'Standard Template',
|
||||||
|
predefined: true,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
resource: 'SaleReceipt',
|
||||||
|
templateName: 'Standard Template',
|
||||||
|
predefined: true,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
resource: 'CreditNote',
|
||||||
|
templateName: 'Standard Template',
|
||||||
|
predefined: true,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
resource: 'PaymentReceive',
|
||||||
|
templateName: 'Standard Template',
|
||||||
|
predefined: true,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param { import("knex").Knex } knex
|
||||||
|
* @returns { Promise<void> }
|
||||||
|
*/
|
||||||
|
exports.down = function (knex) {};
|
||||||
Reference in New Issue
Block a user