<?xml version="1.0" encoding="utf-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>selfoss support forum - items table ID column</title>
<link>https://forum.selfoss.aditu.de/</link>
<description>selfoss support forum</description>
<language>en</language>
<item>
<title>items table ID column (reply)</title>
<content:encoded><![CDATA[<p>Update...  I did some digging into SELFOSS to find where the db gets created and found that for some reason the original db spec for the items table has changed (note the spec for sources which hasn't changed):</p>
<p><br />
<img src="http://i.imgur.com/9rtCgCk.png" class="left" alt="[image]" /></p>
<p><br />
It is indeed supposed to pk, ai... but somehow it's been changed. Perhaps the python mysql libs I'm using to access it have done that.</p>
<p>Anyone have any thoughts?</p>
]]></content:encoded>
<link>https://forum.selfoss.aditu.de/index.php?id=872</link>
<guid>https://forum.selfoss.aditu.de/index.php?id=872</guid>
<pubDate>Mon, 14 Jul 2014 16:12:05 +0000</pubDate>
<dc:creator>jaym</dc:creator>
</item>
<item>
<title>items table ID column</title>
<content:encoded><![CDATA[<p>Hi,  Just wondering... shouldn't then field ID in the items table be autoincrement?</p>
<p>In my items table it's not...<br />
+-----------+--------------+------+-----+---------+-------+<br />
| Field     | Type         | Null | Key | Default | Extra |<br />
+-----------+--------------+------+-----+---------+-------+<br />
| id        | int(11)      | NO   |     | 0       |       |<br />
| datetime  | datetime     | NO   |     | NULL    |       |<br />
| title     | text         | NO   |     | NULL    |       |<br />
| content   | longtext     | NO   |     | NULL    |       |</p>
<p>...and in my table of 15000 items...</p>
<p>mysql&gt; SELECT COUNT(id) from items where id=0;<br />
+-----------+<br />
| COUNT(id) |<br />
+-----------+<br />
|      8960 |<br />
+-----------+</p>
<p>...more than half have ID=0.  This isn't very helpful if I want to use this field as a foreign key.</p>
<p>Anyone else have this issue?  Perhaps my db setup is incorrect?</p>
<p>Thanks!</p>
]]></content:encoded>
<link>https://forum.selfoss.aditu.de/index.php?id=871</link>
<guid>https://forum.selfoss.aditu.de/index.php?id=871</guid>
<pubDate>Mon, 14 Jul 2014 14:40:10 +0000</pubDate>
<dc:creator>jaym</dc:creator>
</item>
</channel>
</rss>
