Make seq autoincrement
This commit is contained in:
parent
4497ba092f
commit
34c8ab53dc
@ -51,6 +51,16 @@
|
||||
<table>
|
||||
<name>*dbprefix*office_op</name>
|
||||
<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>
|
||||
<name>es_id</name>
|
||||
<type>text</type>
|
||||
@ -58,14 +68,6 @@
|
||||
<length>64</length>
|
||||
<comments>Editing session id</comments>
|
||||
</field>
|
||||
<field>
|
||||
<name>seq</name>
|
||||
<type>integer</type>
|
||||
<autoincrement>1</autoincrement>
|
||||
<unsigned>true</unsigned>
|
||||
<length>4</length>
|
||||
<comments>Sequence number</comments>
|
||||
</field>
|
||||
<field>
|
||||
<name>member</name>
|
||||
<type>text</type>
|
||||
@ -79,7 +81,14 @@
|
||||
<notnull>false</notnull>
|
||||
<comments>json-string</comments>
|
||||
</field>
|
||||
|
||||
<index>
|
||||
<name>seq_pKey</name>
|
||||
<primary>true</primary>
|
||||
<field>
|
||||
<name>seq</name>
|
||||
<sorting>ascending</sorting>
|
||||
</field>
|
||||
</index>
|
||||
<index>
|
||||
<name>office_op_eis_index</name>
|
||||
<unique>true</unique>
|
||||
|
@ -5,10 +5,9 @@ namespace OCA\Office;
|
||||
class 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(
|
||||
$op['es_id'],
|
||||
$op['seq'],
|
||||
$op['member'],
|
||||
$op['opspec'],
|
||||
));
|
||||
|
Loading…
x
Reference in New Issue
Block a user