migrations: add option to run on startup
This commit is contained in:
parent
4c7ca7db06
commit
b66502e9c8
@ -1,9 +1,22 @@
|
|||||||
<component name="ProjectCodeStyleConfiguration">
|
<component name="ProjectCodeStyleConfiguration">
|
||||||
<code_scheme name="Project" version="173">
|
<code_scheme name="Project" version="173">
|
||||||
|
<option name="AUTODETECT_INDENTS" value="false" />
|
||||||
|
<option name="OTHER_INDENT_OPTIONS">
|
||||||
|
<value>
|
||||||
|
<option name="INDENT_SIZE" value="2" />
|
||||||
|
<option name="TAB_SIZE" value="2" />
|
||||||
|
<option name="USE_TAB_CHARACTER" value="true" />
|
||||||
|
<option name="SMART_TABS" value="true" />
|
||||||
|
</value>
|
||||||
|
</option>
|
||||||
<option name="LINE_SEPARATOR" value=" " />
|
<option name="LINE_SEPARATOR" value=" " />
|
||||||
<HTMLCodeStyleSettings>
|
<HTMLCodeStyleSettings>
|
||||||
<option name="HTML_ALIGN_ATTRIBUTES" value="false" />
|
<option name="HTML_ALIGN_ATTRIBUTES" value="false" />
|
||||||
|
<option name="HTML_SPACE_INSIDE_EMPTY_TAG" value="true" />
|
||||||
</HTMLCodeStyleSettings>
|
</HTMLCodeStyleSettings>
|
||||||
|
<JSCodeStyleSettings version="0">
|
||||||
|
<option name="JSX_ATTRIBUTE_VALUE" value="Based on type" />
|
||||||
|
</JSCodeStyleSettings>
|
||||||
<SqlCodeStyleSettings version="7">
|
<SqlCodeStyleSettings version="7">
|
||||||
<option name="DISABLE_FORMATTING" value="true" />
|
<option name="DISABLE_FORMATTING" value="true" />
|
||||||
<option name="IMP_DECLARE_ALIGN_TYPE" value="false" />
|
<option name="IMP_DECLARE_ALIGN_TYPE" value="false" />
|
||||||
@ -20,6 +33,47 @@
|
|||||||
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
|
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
|
||||||
<option name="SPACES_WITHIN_IMPORTS" value="true" />
|
<option name="SPACES_WITHIN_IMPORTS" value="true" />
|
||||||
</TypeScriptCodeStyleSettings>
|
</TypeScriptCodeStyleSettings>
|
||||||
|
<codeStyleSettings language="CSS">
|
||||||
|
<indentOptions>
|
||||||
|
<option name="INDENT_SIZE" value="2" />
|
||||||
|
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
||||||
|
<option name="TAB_SIZE" value="2" />
|
||||||
|
<option name="USE_TAB_CHARACTER" value="true" />
|
||||||
|
<option name="SMART_TABS" value="true" />
|
||||||
|
</indentOptions>
|
||||||
|
</codeStyleSettings>
|
||||||
|
<codeStyleSettings language="HTML">
|
||||||
|
<indentOptions>
|
||||||
|
<option name="INDENT_SIZE" value="2" />
|
||||||
|
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
||||||
|
<option name="TAB_SIZE" value="2" />
|
||||||
|
<option name="USE_TAB_CHARACTER" value="true" />
|
||||||
|
<option name="SMART_TABS" value="true" />
|
||||||
|
</indentOptions>
|
||||||
|
</codeStyleSettings>
|
||||||
|
<codeStyleSettings language="JavaScript">
|
||||||
|
<indentOptions>
|
||||||
|
<option name="INDENT_SIZE" value="2" />
|
||||||
|
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
||||||
|
<option name="TAB_SIZE" value="2" />
|
||||||
|
<option name="USE_TAB_CHARACTER" value="true" />
|
||||||
|
<option name="SMART_TABS" value="true" />
|
||||||
|
</indentOptions>
|
||||||
|
</codeStyleSettings>
|
||||||
|
<codeStyleSettings language="SASS">
|
||||||
|
<indentOptions>
|
||||||
|
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
||||||
|
<option name="TAB_SIZE" value="2" />
|
||||||
|
<option name="USE_TAB_CHARACTER" value="true" />
|
||||||
|
</indentOptions>
|
||||||
|
</codeStyleSettings>
|
||||||
|
<codeStyleSettings language="SCSS">
|
||||||
|
<indentOptions>
|
||||||
|
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
||||||
|
<option name="TAB_SIZE" value="2" />
|
||||||
|
<option name="USE_TAB_CHARACTER" value="true" />
|
||||||
|
</indentOptions>
|
||||||
|
</codeStyleSettings>
|
||||||
<codeStyleSettings language="TypeScript">
|
<codeStyleSettings language="TypeScript">
|
||||||
<option name="ALIGN_MULTILINE_FOR" value="false" />
|
<option name="ALIGN_MULTILINE_FOR" value="false" />
|
||||||
<option name="CALL_PARAMETERS_WRAP" value="1" />
|
<option name="CALL_PARAMETERS_WRAP" value="1" />
|
||||||
|
@ -32,7 +32,11 @@ const nextConfig = {
|
|||||||
},
|
},
|
||||||
sassOptions: {
|
sassOptions: {
|
||||||
additionalData: `$asset-url: "${baseAssetUrl}";`
|
additionalData: `$asset-url: "${baseAssetUrl}";`
|
||||||
}
|
},
|
||||||
|
experimental: {
|
||||||
|
instrumentationHook: true
|
||||||
|
},
|
||||||
|
productionBrowserSourceMaps: true
|
||||||
};
|
};
|
||||||
|
|
||||||
export default nextConfig;
|
export default nextConfig;
|
||||||
|
9
src/instrumentation.ts
Normal file
9
src/instrumentation.ts
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
export async function register() {
|
||||||
|
if (process.env.NEXT_RUNTIME === 'nodejs') {
|
||||||
|
if (['true', 'yes', '1'].includes(process.env.AUTOMIGRATE?.toLowerCase()!)) {
|
||||||
|
const DBMigrate = require('db-migrate');
|
||||||
|
const dbmigrate = DBMigrate.getInstance(true);
|
||||||
|
await dbmigrate.up();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user