Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
- Loading branch information
1 parent
cf96392
commit aa9c6d7
Showing
4 changed files
with
26 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 17 additions & 21 deletions
38
templates/table/insert/value_column_for_other_datatype.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,23 @@ | ||
{{ backup_field|raw }} | ||
{% if is_char %} | ||
|
||
{{ text_area|raw -}} | ||
{% if is_textarea %} | ||
{{- html_field|raw -}} | ||
{% else %} | ||
{{ html_input|raw }} | ||
{% if default_generated %} | ||
{{- html_field|raw -}} | ||
{%- if column.Extra matches '/(VIRTUAL|PERSISTENT|GENERATED)/' and 'DEFAULT_GENERATED' not in column.Extra -%} | ||
<input type="hidden" name="virtual{{ columnNameAppendix }}" value="1"> | ||
{% endif %} | ||
{% if column.Extra == 'auto_increment' %} | ||
{%- endif -%} | ||
{%- if column.Extra == 'auto_increment' -%} | ||
<input type="hidden" name="auto_increment{{ columnNameAppendix }}" value="1"> | ||
{% endif %} | ||
{% if column.pma_type|slice(0, 9) == 'timestamp' %} | ||
<input type="hidden" name="fields_type-{{ columnNameAppendix }}" value="timestamp"> | ||
{% endif %} | ||
{% if column.pma_type|slice(0, 4) == 'date' %} | ||
{% if column.pma_type|slice(0, 8) == 'datetime' %} | ||
<input type="hidden" name="auto_increment{{ columnNameAppendix }}" value="datetime"> | ||
{% else %} | ||
<input type="hidden" name="auto_increment{{ columnNameAppendix }}" value="date"> | ||
{% endif %} | ||
{% endif %} | ||
{% if column.True_Type == 'bit' %} | ||
{%- endif -%} | ||
{%- if column.pma_type starts with 'timestamp' -%} | ||
<input type="hidden" name="fields_type{{ columnNameAppendix }}" value="timestamp"> | ||
{%- endif -%} | ||
{%- if column.pma_type starts with 'datetime' -%} | ||
<input type="hidden" name="fields_type{{ columnNameAppendix }}" value="datetime"> | ||
{%- elseif column.pma_type starts with 'date' -%} | ||
<input type="hidden" name="fields_type{{ columnNameAppendix }}" value="date"> | ||
{%- endif -%} | ||
{%- if column.True_Type == 'bit' -%} | ||
<input type="hidden" name="fields_type{{ columnNameAppendix }}" value="bit"> | ||
{% endif %} | ||
{{- html|raw -}} | ||
{%- endif -%} | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters