Make seq autoincrement
This commit is contained in:
parent
4497ba092f
commit
34c8ab53dc
@ -51,6 +51,16 @@
|
|||||||
<table>
|
<table>
|
||||||
<name>*dbprefix*office_op</name>
|
<name>*dbprefix*office_op</name>
|
||||||
<declaration>
|
<declaration>
|
||||||
|
<field>
|
||||||
|
<name>seq</name>
|
||||||
|
<type>integer</type>
|
||||||
|
<default>1</default>
|
||||||
|
<notnull>true</notnull>
|
||||||
|
<autoincrement>1</autoincrement>
|
||||||
|
<unsigned>true</unsigned>
|
||||||
|
<length>4</length>
|
||||||
|
<comments>Sequence number</comments>
|
||||||
|
</field>
|
||||||
<field>
|
<field>
|
||||||
<name>es_id</name>
|
<name>es_id</name>
|
||||||
<type>text</type>
|
<type>text</type>
|
||||||
@ -58,14 +68,6 @@
|
|||||||
<length>64</length>
|
<length>64</length>
|
||||||
<comments>Editing session id</comments>
|
<comments>Editing session id</comments>
|
||||||
</field>
|
</field>
|
||||||
<field>
|
|
||||||
<name>seq</name>
|
|
||||||
<type>integer</type>
|
|
||||||
<autoincrement>1</autoincrement>
|
|
||||||
<unsigned>true</unsigned>
|
|
||||||
<length>4</length>
|
|
||||||
<comments>Sequence number</comments>
|
|
||||||
</field>
|
|
||||||
<field>
|
<field>
|
||||||
<name>member</name>
|
<name>member</name>
|
||||||
<type>text</type>
|
<type>text</type>
|
||||||
@ -79,7 +81,14 @@
|
|||||||
<notnull>false</notnull>
|
<notnull>false</notnull>
|
||||||
<comments>json-string</comments>
|
<comments>json-string</comments>
|
||||||
</field>
|
</field>
|
||||||
|
<index>
|
||||||
|
<name>seq_pKey</name>
|
||||||
|
<primary>true</primary>
|
||||||
|
<field>
|
||||||
|
<name>seq</name>
|
||||||
|
<sorting>ascending</sorting>
|
||||||
|
</field>
|
||||||
|
</index>
|
||||||
<index>
|
<index>
|
||||||
<name>office_op_eis_index</name>
|
<name>office_op_eis_index</name>
|
||||||
<unique>true</unique>
|
<unique>true</unique>
|
||||||
|
@ -5,10 +5,9 @@ namespace OCA\Office;
|
|||||||
class Op {
|
class Op {
|
||||||
|
|
||||||
public static function add($op){
|
public static function add($op){
|
||||||
$query = \OCP\DB::prepare('INSERT INTO `*PREFIX*office_op` (`es_id`, `seq`, `member`, `opspec`) VALUES (?, ?, ?, ?) ');
|
$query = \OCP\DB::prepare('INSERT INTO `*PREFIX*office_op` (`es_id`, `member`, `opspec`) VALUES (?, ?, ?) ');
|
||||||
$result = $query->execute(array(
|
$result = $query->execute(array(
|
||||||
$op['es_id'],
|
$op['es_id'],
|
||||||
$op['seq'],
|
|
||||||
$op['member'],
|
$op['member'],
|
||||||
$op['opspec'],
|
$op['opspec'],
|
||||||
));
|
));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user