mirror of
https://github.com/alanorth/cgspace-notes.git
synced 2024-11-26 08:28:18 +01:00
Update notes for 2018-09-24
This commit is contained in:
parent
27c3f48ef6
commit
2634aff405
@ -459,5 +459,14 @@ Type "help", "copyright", "credits" or "license" for more information.
|
|||||||
|
|
||||||
- Or maybe I should just bite the bullet and migrate this to PostgreSQL, as it [supports `UPSERT` since version 9.5](https://wiki.postgresql.org/wiki/UPSERT) and also seems to have my new favorite `LIMIT` and `OFFSET`
|
- Or maybe I should just bite the bullet and migrate this to PostgreSQL, as it [supports `UPSERT` since version 9.5](https://wiki.postgresql.org/wiki/UPSERT) and also seems to have my new favorite `LIMIT` and `OFFSET`
|
||||||
- I changed the syntax of the SQLite stuff and PostgreSQL is working flawlessly with psycopg2... hmmm.
|
- I changed the syntax of the SQLite stuff and PostgreSQL is working flawlessly with psycopg2... hmmm.
|
||||||
|
- For reference, creating a PostgreSQL database for testing this locally (though `indexer.py` will create the table):
|
||||||
|
|
||||||
|
```
|
||||||
|
$ createdb -h localhost -U postgres -O dspacestatistics --encoding=UNICODE dspacestatistics
|
||||||
|
$ createuser -h localhost -U postgres --pwprompt dspacestatistics
|
||||||
|
$ psql -h localhost -U postgres dspacestatistics
|
||||||
|
dspacestatistics=> CREATE TABLE IF NOT EXISTS items
|
||||||
|
dspacestatistics-> (id INT PRIMARY KEY, views INT DEFAULT 0, downloads INT DEFAULT 0)
|
||||||
|
```
|
||||||
|
|
||||||
<!-- vim: set sw=2 ts=2: -->
|
<!-- vim: set sw=2 ts=2: -->
|
||||||
|
@ -18,7 +18,7 @@ I’m testing the new DSpace 5.8 branch in my Ubuntu 18.04 environment and I
|
|||||||
" />
|
" />
|
||||||
<meta property="og:type" content="article" />
|
<meta property="og:type" content="article" />
|
||||||
<meta property="og:url" content="https://alanorth.github.io/cgspace-notes/2018-09/" /><meta property="article:published_time" content="2018-09-02T09:55:54+03:00"/>
|
<meta property="og:url" content="https://alanorth.github.io/cgspace-notes/2018-09/" /><meta property="article:published_time" content="2018-09-02T09:55:54+03:00"/>
|
||||||
<meta property="article:modified_time" content="2018-09-24T16:35:43+03:00"/>
|
<meta property="article:modified_time" content="2018-09-25T02:24:43+03:00"/>
|
||||||
<meta name="twitter:card" content="summary"/>
|
<meta name="twitter:card" content="summary"/>
|
||||||
<meta name="twitter:title" content="September, 2018"/>
|
<meta name="twitter:title" content="September, 2018"/>
|
||||||
<meta name="twitter:description" content="2018-09-02
|
<meta name="twitter:description" content="2018-09-02
|
||||||
@ -41,9 +41,9 @@ I’m testing the new DSpace 5.8 branch in my Ubuntu 18.04 environment and I
|
|||||||
"@type": "BlogPosting",
|
"@type": "BlogPosting",
|
||||||
"headline": "September, 2018",
|
"headline": "September, 2018",
|
||||||
"url": "https://alanorth.github.io/cgspace-notes/2018-09/",
|
"url": "https://alanorth.github.io/cgspace-notes/2018-09/",
|
||||||
"wordCount": "3318",
|
"wordCount": "3379",
|
||||||
"datePublished": "2018-09-02T09:55:54+03:00",
|
"datePublished": "2018-09-02T09:55:54+03:00",
|
||||||
"dateModified": "2018-09-24T16:35:43+03:00",
|
"dateModified": "2018-09-25T02:24:43+03:00",
|
||||||
"author": {
|
"author": {
|
||||||
"@type": "Person",
|
"@type": "Person",
|
||||||
"name": "Alan Orth"
|
"name": "Alan Orth"
|
||||||
@ -639,8 +639,16 @@ Type "help", "copyright", "credits" or "licen
|
|||||||
<ul>
|
<ul>
|
||||||
<li>Or maybe I should just bite the bullet and migrate this to PostgreSQL, as it <a href="https://wiki.postgresql.org/wiki/UPSERT">supports <code>UPSERT</code> since version 9.5</a> and also seems to have my new favorite <code>LIMIT</code> and <code>OFFSET</code></li>
|
<li>Or maybe I should just bite the bullet and migrate this to PostgreSQL, as it <a href="https://wiki.postgresql.org/wiki/UPSERT">supports <code>UPSERT</code> since version 9.5</a> and also seems to have my new favorite <code>LIMIT</code> and <code>OFFSET</code></li>
|
||||||
<li>I changed the syntax of the SQLite stuff and PostgreSQL is working flawlessly with psycopg2… hmmm.</li>
|
<li>I changed the syntax of the SQLite stuff and PostgreSQL is working flawlessly with psycopg2… hmmm.</li>
|
||||||
|
<li>For reference, creating a PostgreSQL database for testing this locally (though <code>indexer.py</code> will create the table):</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<pre><code>$ createdb -h localhost -U postgres -O dspacestatistics --encoding=UNICODE dspacestatistics
|
||||||
|
$ createuser -h localhost -U postgres --pwprompt dspacestatistics
|
||||||
|
$ psql -h localhost -U postgres dspacestatistics
|
||||||
|
dspacestatistics=> CREATE TABLE IF NOT EXISTS items
|
||||||
|
dspacestatistics-> (id INT PRIMARY KEY, views INT DEFAULT 0, downloads INT DEFAULT 0)
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
<!-- vim: set sw=2 ts=2: -->
|
<!-- vim: set sw=2 ts=2: -->
|
||||||
|
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>https://alanorth.github.io/cgspace-notes/2018-09/</loc>
|
<loc>https://alanorth.github.io/cgspace-notes/2018-09/</loc>
|
||||||
<lastmod>2018-09-24T16:35:43+03:00</lastmod>
|
<lastmod>2018-09-25T02:24:43+03:00</lastmod>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
<url>
|
<url>
|
||||||
@ -184,7 +184,7 @@
|
|||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>https://alanorth.github.io/cgspace-notes/</loc>
|
<loc>https://alanorth.github.io/cgspace-notes/</loc>
|
||||||
<lastmod>2018-09-24T16:35:43+03:00</lastmod>
|
<lastmod>2018-09-25T02:24:43+03:00</lastmod>
|
||||||
<priority>0</priority>
|
<priority>0</priority>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
@ -195,7 +195,7 @@
|
|||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>https://alanorth.github.io/cgspace-notes/tags/notes/</loc>
|
<loc>https://alanorth.github.io/cgspace-notes/tags/notes/</loc>
|
||||||
<lastmod>2018-09-24T16:35:43+03:00</lastmod>
|
<lastmod>2018-09-25T02:24:43+03:00</lastmod>
|
||||||
<priority>0</priority>
|
<priority>0</priority>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
@ -207,13 +207,13 @@
|
|||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>https://alanorth.github.io/cgspace-notes/posts/</loc>
|
<loc>https://alanorth.github.io/cgspace-notes/posts/</loc>
|
||||||
<lastmod>2018-09-24T16:35:43+03:00</lastmod>
|
<lastmod>2018-09-25T02:24:43+03:00</lastmod>
|
||||||
<priority>0</priority>
|
<priority>0</priority>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>https://alanorth.github.io/cgspace-notes/tags/</loc>
|
<loc>https://alanorth.github.io/cgspace-notes/tags/</loc>
|
||||||
<lastmod>2018-09-24T16:35:43+03:00</lastmod>
|
<lastmod>2018-09-25T02:24:43+03:00</lastmod>
|
||||||
<priority>0</priority>
|
<priority>0</priority>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user