|
|
@ -36,308 +36,310 @@ |
|
|
|
@input="newColumn.altered = newColumn.altered || 8" |
|
|
|
@input="newColumn.altered = newColumn.altered || 8" |
|
|
|
/> |
|
|
|
/> |
|
|
|
</v-col> |
|
|
|
</v-col> |
|
|
|
<div |
|
|
|
<v-container |
|
|
|
|
|
|
|
fluid |
|
|
|
:class="{ |
|
|
|
:class="{ |
|
|
|
editDisabled :isEditDisabled |
|
|
|
editDisabled :isEditDisabled |
|
|
|
}" |
|
|
|
}" |
|
|
|
> |
|
|
|
> |
|
|
|
<v-col v-if="relation" cols="12"> |
|
|
|
<v-row> |
|
|
|
<div class="caption"> |
|
|
|
<v-col v-if="relation" cols="12"> |
|
|
|
<p class="mb-1"> |
|
|
|
<div class="caption"> |
|
|
|
Foreign Key |
|
|
|
<p class="mb-1"> |
|
|
|
</p> |
|
|
|
Foreign Key |
|
|
|
|
|
|
|
</p> |
|
|
|
<v-icon small class="mt-n1"> |
|
|
|
|
|
|
|
mdi-table |
|
|
|
<v-icon small class="mt-n1"> |
|
|
|
</v-icon> |
|
|
|
mdi-table |
|
|
|
<span class="text-capitalize font-weight-bold body-1"> {{ relation._rtn }}</span> |
|
|
|
</v-icon> |
|
|
|
<v-icon |
|
|
|
<span class="text-capitalize font-weight-bold body-1"> {{ relation._rtn }}</span> |
|
|
|
v-ge="['columns','fk-delete']" |
|
|
|
<v-icon |
|
|
|
small |
|
|
|
v-ge="['columns','fk-delete']" |
|
|
|
class="ml-3 mt-n1" |
|
|
|
small |
|
|
|
color="error" |
|
|
|
class="ml-3 mt-n1" |
|
|
|
@click="deleteRelation('showDialog', column)" |
|
|
|
color="error" |
|
|
|
> |
|
|
|
@click="deleteRelation('showDialog', column)" |
|
|
|
mdi-delete-forever |
|
|
|
> |
|
|
|
</v-icon> |
|
|
|
mdi-delete-forever |
|
|
|
<span v-if="relation.type=== 'virtual'" class="caption">(v)</span> |
|
|
|
</v-icon> |
|
|
|
</div> |
|
|
|
<span v-if="relation.type=== 'virtual'" class="caption">(v)</span> |
|
|
|
</v-col> |
|
|
|
</div> |
|
|
|
<template v-else> |
|
|
|
</v-col> |
|
|
|
<v-col cols="12"> |
|
|
|
<template v-else> |
|
|
|
<v-autocomplete |
|
|
|
<v-col cols="12"> |
|
|
|
v-model="newColumn.uidt" |
|
|
|
<v-autocomplete |
|
|
|
hide-details |
|
|
|
v-model="newColumn.uidt" |
|
|
|
item-value="name" |
|
|
|
hide-details |
|
|
|
item-text="name" |
|
|
|
item-value="name" |
|
|
|
class="caption ui-type" |
|
|
|
item-text="name" |
|
|
|
:class="{'primary lighten-5' : newColumn.uidt }" |
|
|
|
class="caption ui-type" |
|
|
|
label="Column type" |
|
|
|
:class="{'primary lighten-5' : newColumn.uidt }" |
|
|
|
dense |
|
|
|
label="Column type" |
|
|
|
outlined |
|
|
|
dense |
|
|
|
:items="uiTypes" |
|
|
|
outlined |
|
|
|
@change="onUiTypeChange" |
|
|
|
:items="uiTypes" |
|
|
|
> |
|
|
|
@change="onUiTypeChange" |
|
|
|
<template #selection="{item}"> |
|
|
|
> |
|
|
|
<div> |
|
|
|
<template #selection="{item}"> |
|
|
|
<v-icon color="grey darken-4" small class="mr-1"> |
|
|
|
<div> |
|
|
|
{{ item.icon }} |
|
|
|
<v-icon color="grey darken-4" small class="mr-1"> |
|
|
|
</v-icon> |
|
|
|
{{ item.icon }} |
|
|
|
<span class="caption grey--text text--darken-4"> {{ item.name }}</span> |
|
|
|
</v-icon> |
|
|
|
</div> |
|
|
|
<span class="caption grey--text text--darken-4"> {{ item.name }}</span> |
|
|
|
</template> |
|
|
|
</div> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<template #item="{item}"> |
|
|
|
<template #item="{item}"> |
|
|
|
<div class="caption"> |
|
|
|
<div class="caption"> |
|
|
|
<v-icon small class="mr-1"> |
|
|
|
<v-icon small class="mr-1"> |
|
|
|
{{ item.icon }} |
|
|
|
{{ item.icon }} |
|
|
|
</v-icon> |
|
|
|
</v-icon> |
|
|
|
{{ item.name }} |
|
|
|
{{ item.name }} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</v-autocomplete> |
|
|
|
</v-autocomplete> |
|
|
|
|
|
|
|
|
|
|
|
<!-- <v-list dense max-height="calc(100vh - 300px)" style="overflow: auto">--> |
|
|
|
<!-- <v-list dense max-height="calc(100vh - 300px)" style="overflow: auto">--> |
|
|
|
<!-- <v-list-item v-for="item in uiTypes" @click.stop :key="item">--> |
|
|
|
<!-- <v-list-item v-for="item in uiTypes" @click.stop :key="item">--> |
|
|
|
<!-- <span class="caption">{{ item }}</span>--> |
|
|
|
<!-- <span class="caption">{{ item }}</span>--> |
|
|
|
<!-- </v-list-item>--> |
|
|
|
<!-- </v-list-item>--> |
|
|
|
<!-- </v-list>--> |
|
|
|
<!-- </v-list>--> |
|
|
|
</v-col> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<template v-if="newColumn.uidt !== 'Formula'"> |
|
|
|
|
|
|
|
<v-col |
|
|
|
|
|
|
|
v-if="isLookup" |
|
|
|
|
|
|
|
cols="12" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<lookup-options |
|
|
|
|
|
|
|
ref="lookup" |
|
|
|
|
|
|
|
:column="newColumn" |
|
|
|
|
|
|
|
:nodes="nodes" |
|
|
|
|
|
|
|
:meta="meta" |
|
|
|
|
|
|
|
:is-s-q-lite="isSQLite" |
|
|
|
|
|
|
|
:alias="newColumn.cn" |
|
|
|
|
|
|
|
:is-m-s-s-q-l="isMSSQL" |
|
|
|
|
|
|
|
v-on="$listeners" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</v-col> |
|
|
|
|
|
|
|
<v-col |
|
|
|
|
|
|
|
v-if="isLinkToAnotherRecord" |
|
|
|
|
|
|
|
cols="12" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<linked-to-another-options |
|
|
|
|
|
|
|
ref="relation" |
|
|
|
|
|
|
|
:column="newColumn" |
|
|
|
|
|
|
|
:nodes="nodes" |
|
|
|
|
|
|
|
:meta="meta" |
|
|
|
|
|
|
|
:is-s-q-lite="isSQLite" |
|
|
|
|
|
|
|
:alias="newColumn.cn" |
|
|
|
|
|
|
|
:is-m-s-s-q-l="isMSSQL" |
|
|
|
|
|
|
|
@onColumnSelect="onRelColumnSelect" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</v-col> |
|
|
|
|
|
|
|
<v-col |
|
|
|
|
|
|
|
v-if="isRelation" |
|
|
|
|
|
|
|
cols="12" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<relation-options |
|
|
|
|
|
|
|
ref="relation" |
|
|
|
|
|
|
|
:column="newColumn" |
|
|
|
|
|
|
|
:nodes="nodes" |
|
|
|
|
|
|
|
:is-m-s-s-q-l="isMSSQL" |
|
|
|
|
|
|
|
:is-s-q-lite="isSQLite" |
|
|
|
|
|
|
|
@onColumnSelect="onRelColumnSelect" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</v-col> |
|
|
|
</v-col> |
|
|
|
|
|
|
|
|
|
|
|
<v-col v-if="isSelect" cols="12"> |
|
|
|
<template v-if="newColumn.uidt !== 'Formula'"> |
|
|
|
<custom-select-options |
|
|
|
<v-col |
|
|
|
v-model="newColumn.dtxp" |
|
|
|
v-if="isLookup" |
|
|
|
@input="newColumn.altered = newColumn.altered || 2" |
|
|
|
cols="12" |
|
|
|
/> |
|
|
|
> |
|
|
|
</v-col> |
|
|
|
<lookup-options |
|
|
|
|
|
|
|
ref="lookup" |
|
|
|
|
|
|
|
:column="newColumn" |
|
|
|
|
|
|
|
:nodes="nodes" |
|
|
|
|
|
|
|
:meta="meta" |
|
|
|
|
|
|
|
:is-s-q-lite="isSQLite" |
|
|
|
|
|
|
|
:alias="newColumn.cn" |
|
|
|
|
|
|
|
:is-m-s-s-q-l="isMSSQL" |
|
|
|
|
|
|
|
v-on="$listeners" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</v-col> |
|
|
|
|
|
|
|
<v-col |
|
|
|
|
|
|
|
v-if="isLinkToAnotherRecord" |
|
|
|
|
|
|
|
cols="12" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<linked-to-another-options |
|
|
|
|
|
|
|
ref="relation" |
|
|
|
|
|
|
|
:column="newColumn" |
|
|
|
|
|
|
|
:nodes="nodes" |
|
|
|
|
|
|
|
:meta="meta" |
|
|
|
|
|
|
|
:is-s-q-lite="isSQLite" |
|
|
|
|
|
|
|
:alias="newColumn.cn" |
|
|
|
|
|
|
|
:is-m-s-s-q-l="isMSSQL" |
|
|
|
|
|
|
|
@onColumnSelect="onRelColumnSelect" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</v-col> |
|
|
|
|
|
|
|
<v-col |
|
|
|
|
|
|
|
v-if="isRelation" |
|
|
|
|
|
|
|
cols="12" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<relation-options |
|
|
|
|
|
|
|
ref="relation" |
|
|
|
|
|
|
|
:column="newColumn" |
|
|
|
|
|
|
|
:nodes="nodes" |
|
|
|
|
|
|
|
:is-m-s-s-q-l="isMSSQL" |
|
|
|
|
|
|
|
:is-s-q-lite="isSQLite" |
|
|
|
|
|
|
|
@onColumnSelect="onRelColumnSelect" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</v-col> |
|
|
|
|
|
|
|
|
|
|
|
<template v-if="newColumn.cn && newColumn.uidt && !isLinkToAnotherRecord && !isLookup"> |
|
|
|
<v-col v-if="isSelect" cols="12"> |
|
|
|
<v-col cols="12"> |
|
|
|
<custom-select-options |
|
|
|
<v-container fluid class="wrapper"> |
|
|
|
v-model="newColumn.dtxp" |
|
|
|
<v-row> |
|
|
|
@input="newColumn.altered = newColumn.altered || 2" |
|
|
|
<v-col cols="12"> |
|
|
|
/> |
|
|
|
<div class="d-flex justify-space-between caption"> |
|
|
|
|
|
|
|
<v-tooltip bottom z-index="99999"> |
|
|
|
|
|
|
|
<template #activator="{on}"> |
|
|
|
|
|
|
|
<div v-on="on"> |
|
|
|
|
|
|
|
<v-checkbox |
|
|
|
|
|
|
|
v-model="newColumn.rqd" |
|
|
|
|
|
|
|
:disabled="newColumn.pk || !sqlUi.columnEditable(newColumn)" |
|
|
|
|
|
|
|
class="mr-2 mt-0" |
|
|
|
|
|
|
|
dense |
|
|
|
|
|
|
|
hide-details |
|
|
|
|
|
|
|
label="NN" |
|
|
|
|
|
|
|
@input="newColumn.altered = newColumn.altered || 2" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<template #label> |
|
|
|
|
|
|
|
<span class="caption font-weight-bold">NN</span> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</v-checkbox> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
<span>Not Null</span> |
|
|
|
|
|
|
|
</v-tooltip> |
|
|
|
|
|
|
|
<v-tooltip bottom z-index="99999"> |
|
|
|
|
|
|
|
<template #activator="{on}"> |
|
|
|
|
|
|
|
<div v-on="on"> |
|
|
|
|
|
|
|
<v-checkbox |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
v-model="newColumn.pk" |
|
|
|
|
|
|
|
:disabled="!sqlUi.columnEditable(newColumn)" |
|
|
|
|
|
|
|
class="mr-2 mt-0" |
|
|
|
|
|
|
|
dense |
|
|
|
|
|
|
|
hide-details |
|
|
|
|
|
|
|
label="PK" |
|
|
|
|
|
|
|
@input="newColumn.altered = newColumn.altered || 2" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<template #label> |
|
|
|
|
|
|
|
<span class="caption font-weight-bold">PK</span> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</v-checkbox> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
<span>Primary Key</span> |
|
|
|
|
|
|
|
</v-tooltip> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<v-tooltip bottom z-index="99999"> |
|
|
|
|
|
|
|
<template #activator="{on}"> |
|
|
|
|
|
|
|
<div v-on="on"> |
|
|
|
|
|
|
|
<v-checkbox |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
v-model="newColumn.ai" |
|
|
|
|
|
|
|
:disabled="sqlUi.colPropUNDisabled(newColumn) || !sqlUi.columnEditable(newColumn)" |
|
|
|
|
|
|
|
class="mr-2 mt-0" |
|
|
|
|
|
|
|
dense |
|
|
|
|
|
|
|
hide-details |
|
|
|
|
|
|
|
label="AI" |
|
|
|
|
|
|
|
@input="newColumn.altered = newColumn.altered || 2" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<template #label> |
|
|
|
|
|
|
|
<span class="caption font-weight-bold">AI</span> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</v-checkbox> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
<span>Auto Increment</span> |
|
|
|
|
|
|
|
</v-tooltip> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<v-tooltip bottom z-index="99999"> |
|
|
|
|
|
|
|
<template #activator="{on}"> |
|
|
|
|
|
|
|
<div v-on="on"> |
|
|
|
|
|
|
|
<v-checkbox |
|
|
|
|
|
|
|
v-model="newColumn.un" |
|
|
|
|
|
|
|
class="mr-2 mt-0" |
|
|
|
|
|
|
|
dense |
|
|
|
|
|
|
|
hide-details |
|
|
|
|
|
|
|
label="UN" |
|
|
|
|
|
|
|
:disabled="sqlUi.colPropUNDisabled(newColumn) || !sqlUi.columnEditable(newColumn)" |
|
|
|
|
|
|
|
@input="newColumn.altered = newColumn.altered || 2" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<template #label> |
|
|
|
|
|
|
|
<span class="caption font-weight-bold">UN</span> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</v-checkbox> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
<span>Unsigned</span> |
|
|
|
|
|
|
|
</v-tooltip> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<v-tooltip bottom z-index="99999"> |
|
|
|
|
|
|
|
<template #activator="{on}"> |
|
|
|
|
|
|
|
<div v-on="on"> |
|
|
|
|
|
|
|
<v-checkbox |
|
|
|
|
|
|
|
v-model="newColumn.au" |
|
|
|
|
|
|
|
class="mr-2 mt-0" |
|
|
|
|
|
|
|
dense |
|
|
|
|
|
|
|
hide-details |
|
|
|
|
|
|
|
label="UN" |
|
|
|
|
|
|
|
:disabled=" sqlUi.colPropAuDisabled(newColumn) || !sqlUi.columnEditable(newColumn)" |
|
|
|
|
|
|
|
@input="newColumn.altered = newColumn.altered || 2" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<template #label> |
|
|
|
|
|
|
|
<span class="caption font-weight-bold">AU</span> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</v-checkbox> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
<span>Auto Update Timestamp</span> |
|
|
|
|
|
|
|
</v-tooltip> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</v-col> |
|
|
|
|
|
|
|
<v-col cols="12"> |
|
|
|
|
|
|
|
<v-autocomplete |
|
|
|
|
|
|
|
v-model="newColumn.dt" |
|
|
|
|
|
|
|
hide-details |
|
|
|
|
|
|
|
class="caption data-type" |
|
|
|
|
|
|
|
label="Type in Database" |
|
|
|
|
|
|
|
dense |
|
|
|
|
|
|
|
outlined |
|
|
|
|
|
|
|
:items="dataTypes" |
|
|
|
|
|
|
|
@change="onDataTypeChange" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</v-col> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<v-col :cols="sqlUi.showScale(newColumn) && !isSelect ? 6 : 12"> |
|
|
|
|
|
|
|
<v-text-field |
|
|
|
|
|
|
|
v-if="!isSelect" |
|
|
|
|
|
|
|
v-model="newColumn.dtxp" |
|
|
|
|
|
|
|
dense |
|
|
|
|
|
|
|
:disabled="sqlUi.getDefaultLengthIsDisabled(newColumn.dt) || !sqlUi.columnEditable(newColumn)" |
|
|
|
|
|
|
|
class="caption" |
|
|
|
|
|
|
|
label="Length / Values" |
|
|
|
|
|
|
|
outlined |
|
|
|
|
|
|
|
hide-details |
|
|
|
|
|
|
|
@input="newColumn.altered = newColumn.altered || 2" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</v-col> |
|
|
|
|
|
|
|
<v-col v-if="sqlUi.showScale(newColumn)" :cols="isSelect ?12 : 6"> |
|
|
|
|
|
|
|
<v-text-field |
|
|
|
|
|
|
|
v-model="newColumn.dtxs" |
|
|
|
|
|
|
|
dense |
|
|
|
|
|
|
|
:disabled=" !sqlUi.columnEditable(newColumn)" |
|
|
|
|
|
|
|
class="caption" |
|
|
|
|
|
|
|
label="Scale" |
|
|
|
|
|
|
|
outlined |
|
|
|
|
|
|
|
hide-details |
|
|
|
|
|
|
|
@input="newColumn.altered = newColumn.altered || 2" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</v-col> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<v-col cols="12"> |
|
|
|
|
|
|
|
<v-textarea |
|
|
|
|
|
|
|
v-model="newColumn.cdf" |
|
|
|
|
|
|
|
label="Default value" |
|
|
|
|
|
|
|
:hint="sqlUi.getDefaultValueForDatatype(newColumn.dt)" |
|
|
|
|
|
|
|
persistent-hint |
|
|
|
|
|
|
|
rows="3" |
|
|
|
|
|
|
|
outlined |
|
|
|
|
|
|
|
dense |
|
|
|
|
|
|
|
class="caption" |
|
|
|
|
|
|
|
@input="newColumn.altered = newColumn.altered || 2" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</v-col> |
|
|
|
|
|
|
|
</v-row> |
|
|
|
|
|
|
|
</v-container> |
|
|
|
|
|
|
|
</v-col> |
|
|
|
</v-col> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<template v-if="newColumn.cn && newColumn.uidt && !isLinkToAnotherRecord && !isLookup"> |
|
|
|
|
|
|
|
<v-col cols="12"> |
|
|
|
|
|
|
|
<v-container fluid class="wrapper"> |
|
|
|
|
|
|
|
<v-row> |
|
|
|
|
|
|
|
<v-col cols="12"> |
|
|
|
|
|
|
|
<div class="d-flex justify-space-between caption"> |
|
|
|
|
|
|
|
<v-tooltip bottom z-index="99999"> |
|
|
|
|
|
|
|
<template #activator="{on}"> |
|
|
|
|
|
|
|
<div v-on="on"> |
|
|
|
|
|
|
|
<v-checkbox |
|
|
|
|
|
|
|
v-model="newColumn.rqd" |
|
|
|
|
|
|
|
:disabled="newColumn.pk || !sqlUi.columnEditable(newColumn)" |
|
|
|
|
|
|
|
class="mr-2 mt-0" |
|
|
|
|
|
|
|
dense |
|
|
|
|
|
|
|
hide-details |
|
|
|
|
|
|
|
label="NN" |
|
|
|
|
|
|
|
@input="newColumn.altered = newColumn.altered || 2" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<template #label> |
|
|
|
|
|
|
|
<span class="caption font-weight-bold">NN</span> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</v-checkbox> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
<span>Not Null</span> |
|
|
|
|
|
|
|
</v-tooltip> |
|
|
|
|
|
|
|
<v-tooltip bottom z-index="99999"> |
|
|
|
|
|
|
|
<template #activator="{on}"> |
|
|
|
|
|
|
|
<div v-on="on"> |
|
|
|
|
|
|
|
<v-checkbox |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
v-model="newColumn.pk" |
|
|
|
|
|
|
|
:disabled="!sqlUi.columnEditable(newColumn)" |
|
|
|
|
|
|
|
class="mr-2 mt-0" |
|
|
|
|
|
|
|
dense |
|
|
|
|
|
|
|
hide-details |
|
|
|
|
|
|
|
label="PK" |
|
|
|
|
|
|
|
@input="newColumn.altered = newColumn.altered || 2" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<template #label> |
|
|
|
|
|
|
|
<span class="caption font-weight-bold">PK</span> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</v-checkbox> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
<span>Primary Key</span> |
|
|
|
|
|
|
|
</v-tooltip> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<v-tooltip bottom z-index="99999"> |
|
|
|
|
|
|
|
<template #activator="{on}"> |
|
|
|
|
|
|
|
<div v-on="on"> |
|
|
|
|
|
|
|
<v-checkbox |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
v-model="newColumn.ai" |
|
|
|
|
|
|
|
:disabled="sqlUi.colPropUNDisabled(newColumn) || !sqlUi.columnEditable(newColumn)" |
|
|
|
|
|
|
|
class="mr-2 mt-0" |
|
|
|
|
|
|
|
dense |
|
|
|
|
|
|
|
hide-details |
|
|
|
|
|
|
|
label="AI" |
|
|
|
|
|
|
|
@input="newColumn.altered = newColumn.altered || 2" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<template #label> |
|
|
|
|
|
|
|
<span class="caption font-weight-bold">AI</span> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</v-checkbox> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
<span>Auto Increment</span> |
|
|
|
|
|
|
|
</v-tooltip> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<v-tooltip bottom z-index="99999"> |
|
|
|
|
|
|
|
<template #activator="{on}"> |
|
|
|
|
|
|
|
<div v-on="on"> |
|
|
|
|
|
|
|
<v-checkbox |
|
|
|
|
|
|
|
v-model="newColumn.un" |
|
|
|
|
|
|
|
class="mr-2 mt-0" |
|
|
|
|
|
|
|
dense |
|
|
|
|
|
|
|
hide-details |
|
|
|
|
|
|
|
label="UN" |
|
|
|
|
|
|
|
:disabled="sqlUi.colPropUNDisabled(newColumn) || !sqlUi.columnEditable(newColumn)" |
|
|
|
|
|
|
|
@input="newColumn.altered = newColumn.altered || 2" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<template #label> |
|
|
|
|
|
|
|
<span class="caption font-weight-bold">UN</span> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</v-checkbox> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
<span>Unsigned</span> |
|
|
|
|
|
|
|
</v-tooltip> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<v-tooltip bottom z-index="99999"> |
|
|
|
|
|
|
|
<template #activator="{on}"> |
|
|
|
|
|
|
|
<div v-on="on"> |
|
|
|
|
|
|
|
<v-checkbox |
|
|
|
|
|
|
|
v-model="newColumn.au" |
|
|
|
|
|
|
|
class="mr-2 mt-0" |
|
|
|
|
|
|
|
dense |
|
|
|
|
|
|
|
hide-details |
|
|
|
|
|
|
|
label="UN" |
|
|
|
|
|
|
|
:disabled=" sqlUi.colPropAuDisabled(newColumn) || !sqlUi.columnEditable(newColumn)" |
|
|
|
|
|
|
|
@input="newColumn.altered = newColumn.altered || 2" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<template #label> |
|
|
|
|
|
|
|
<span class="caption font-weight-bold">AU</span> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</v-checkbox> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
<span>Auto Update Timestamp</span> |
|
|
|
|
|
|
|
</v-tooltip> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</v-col> |
|
|
|
|
|
|
|
<v-col cols="12"> |
|
|
|
|
|
|
|
<v-autocomplete |
|
|
|
|
|
|
|
v-model="newColumn.dt" |
|
|
|
|
|
|
|
hide-details |
|
|
|
|
|
|
|
class="caption data-type" |
|
|
|
|
|
|
|
label="Type in Database" |
|
|
|
|
|
|
|
dense |
|
|
|
|
|
|
|
outlined |
|
|
|
|
|
|
|
:items="dataTypes" |
|
|
|
|
|
|
|
@change="onDataTypeChange" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</v-col> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<v-col :cols="sqlUi.showScale(newColumn) && !isSelect ? 6 : 12"> |
|
|
|
|
|
|
|
<v-text-field |
|
|
|
|
|
|
|
v-if="!isSelect" |
|
|
|
|
|
|
|
v-model="newColumn.dtxp" |
|
|
|
|
|
|
|
dense |
|
|
|
|
|
|
|
:disabled="sqlUi.getDefaultLengthIsDisabled(newColumn.dt) || !sqlUi.columnEditable(newColumn)" |
|
|
|
|
|
|
|
class="caption" |
|
|
|
|
|
|
|
label="Length / Values" |
|
|
|
|
|
|
|
outlined |
|
|
|
|
|
|
|
hide-details |
|
|
|
|
|
|
|
@input="newColumn.altered = newColumn.altered || 2" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</v-col> |
|
|
|
|
|
|
|
<v-col v-if="sqlUi.showScale(newColumn)" :cols="isSelect ?12 : 6"> |
|
|
|
|
|
|
|
<v-text-field |
|
|
|
|
|
|
|
v-model="newColumn.dtxs" |
|
|
|
|
|
|
|
dense |
|
|
|
|
|
|
|
:disabled=" !sqlUi.columnEditable(newColumn)" |
|
|
|
|
|
|
|
class="caption" |
|
|
|
|
|
|
|
label="Scale" |
|
|
|
|
|
|
|
outlined |
|
|
|
|
|
|
|
hide-details |
|
|
|
|
|
|
|
@input="newColumn.altered = newColumn.altered || 2" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</v-col> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<v-col cols="12"> |
|
|
|
|
|
|
|
<v-textarea |
|
|
|
|
|
|
|
v-model="newColumn.cdf" |
|
|
|
|
|
|
|
label="Default value" |
|
|
|
|
|
|
|
:hint="sqlUi.getDefaultValueForDatatype(newColumn.dt)" |
|
|
|
|
|
|
|
persistent-hint |
|
|
|
|
|
|
|
rows="3" |
|
|
|
|
|
|
|
outlined |
|
|
|
|
|
|
|
dense |
|
|
|
|
|
|
|
class="caption" |
|
|
|
|
|
|
|
@input="newColumn.altered = newColumn.altered || 2" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</v-col> |
|
|
|
|
|
|
|
</v-row> |
|
|
|
|
|
|
|
</v-container> |
|
|
|
|
|
|
|
</v-col> |
|
|
|
|
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<template v-else> |
|
|
|
<template v-else> |
|
|
|
<v-col cols="12"> |
|
|
|
<v-col cols12> |
|
|
|
<formula-options |
|
|
|
<formula-options |
|
|
|
ref="formula" |
|
|
|
ref="formula" |
|
|
|
:column="newColumn" |
|
|
|
:column="newColumn" |
|
|
|
:nodes="nodes" |
|
|
|
:nodes="nodes" |
|
|
|
:meta="meta" |
|
|
|
:meta="meta" |
|
|
|
:is-s-q-lite="isSQLite" |
|
|
|
:is-s-q-lite="isSQLite" |
|
|
|
:alias="newColumn.cn" |
|
|
|
:alias="newColumn.cn" |
|
|
|
:is-m-s-s-q-l="isMSSQL" |
|
|
|
:is-m-s-s-q-l="isMSSQL" |
|
|
|
v-on="$listeners" |
|
|
|
v-on="$listeners" |
|
|
|
/> |
|
|
|
/> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- <v-autocomplete |
|
|
|
<!-- <v-autocomplete |
|
|
|
label="Formula" |
|
|
|
label="Formula" |
|
|
@ -351,20 +353,21 @@ |
|
|
|
<span class="green--text text--darken-2 caption font-weight-regular">{{ item }}</span> |
|
|
|
<span class="green--text text--darken-2 caption font-weight-regular">{{ item }}</span> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</v-autocomplete>--> |
|
|
|
</v-autocomplete>--> |
|
|
|
</v-col> |
|
|
|
</v-col> |
|
|
|
|
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<div class="disabled-info" :class="{'d-none':!isEditDisabled}"> |
|
|
|
<div class="disabled-info" :class="{'d-none':!isEditDisabled}"> |
|
|
|
<v-alert dense type="warning" icon="info" class="caption mx-2" outlined> |
|
|
|
<v-alert dense type="warning" icon="info" class="caption mx-2" outlined> |
|
|
|
This spreadsheet is connected to an SQLite DB.<br> |
|
|
|
This spreadsheet is connected to an SQLite DB.<br> |
|
|
|
For production please see <a |
|
|
|
For production please see <a |
|
|
|
href="https://github.com/nocodb/nocodb#production-setup" |
|
|
|
href="https://github.com/nocodb/nocodb#production-setup" |
|
|
|
target="_blank" |
|
|
|
target="_blank" |
|
|
|
>here</a>. |
|
|
|
>here</a>. |
|
|
|
</v-alert> |
|
|
|
</v-alert> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</v-row> |
|
|
|
</div> |
|
|
|
</v-container> |
|
|
|
</v-row> |
|
|
|
</v-row> |
|
|
|
</v-container> |
|
|
|
</v-container> |
|
|
|
</v-form> |
|
|
|
</v-form> |
|
|
@ -495,9 +498,9 @@ export default { |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
try { |
|
|
|
try { |
|
|
|
if (this.newColumn.uidt === 'Formula') { |
|
|
|
// if (this.newColumn.uidt === 'Formula') { |
|
|
|
return this.$toast.info('Coming Soon...').goAway(3000) |
|
|
|
// return this.$toast.info('Coming Soon...').goAway(3000) |
|
|
|
} |
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
if (this.isLinkToAnotherRecord && this.$refs.relation) { |
|
|
|
if (this.isLinkToAnotherRecord && this.$refs.relation) { |
|
|
|
await this.$refs.relation.saveRelation() |
|
|
|
await this.$refs.relation.saveRelation() |
|
|
@ -506,6 +509,9 @@ export default { |
|
|
|
if (this.isLookup && this.$refs.lookup) { |
|
|
|
if (this.isLookup && this.$refs.lookup) { |
|
|
|
return await this.$refs.lookup.save() |
|
|
|
return await this.$refs.lookup.save() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (this.newColumn.uidt === 'Formula' && this.$refs.formula) { |
|
|
|
|
|
|
|
return await this.$refs.formula.save() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.newColumn.tn = this.nodes.tn |
|
|
|
this.newColumn.tn = this.nodes.tn |
|
|
|
this.newColumn._cn = this.newColumn.cn |
|
|
|
this.newColumn._cn = this.newColumn.cn |
|
|
|