Commit 748fd20a authored by Konrad Borowski's avatar Konrad Borowski

Merge remote-tracking branch 'origin/master' into txt-cors

parents 4dedf4cf 70e48478
Pipeline #106391920 passed with stages
in 20 minutes and 6 seconds
......@@ -31,7 +31,7 @@ test:stable: &test
stage: test
services:
- postgres
- name: registry.gitlab.com/pastebin.run/sandbox/master
- name: registry.gitlab.com/pastebinrun/sandbox/master
alias: sandbox
variables:
POSTGRES_DB: db
......
......@@ -18,7 +18,6 @@ const languagesMap = {
php: [() => import('codemirror/mode/php/php'), 'application/x-httpd-php'],
plaintext: [() => { }, 'text/plain'],
postgresql: [() => import('codemirror/mode/sql/sql'), 'text/x-pgsql'],
python2: [() => import('codemirror/mode/python/python'), 'text/x-python'],
python: [() => import('codemirror/mode/python/python'), 'text/x-python'],
raku: [() => import('./raku'), 'text/x-raku'],
rust: [() => import('codemirror/mode/rust/rust'), 'text/x-rustsrc'],
......
......@@ -41,7 +41,6 @@ const languageMap = {
php: 'php',
plaintext: null,
postgresql: 'sql',
python2: 'python',
python: 'python',
raku: null,
rust: 'rust',
......
......@@ -224,10 +224,6 @@
"identifier": "postgresql",
"name": "PostgreSQL"
},
{
"identifier": "python2",
"name": "Python 2"
},
{
"identifier": "python",
"name": "Python 3",
......
UPDATE pastes
SET language_id = (
SELECT language_id
FROM languages
WHERE identifier = 'python'
)
WHERE language_id = (
SELECT language_id
FROM languages
WHERE identifier = 'python2'
);
DELETE FROM languages WHERE identifier = 'python2';
......@@ -110,10 +110,7 @@ pub fn run(connection: &Connection) -> Result<(), Box<dyn Error>> {
implementations::identifier,
implementations::ordering,
))
.on_conflict((
implementations::language_id,
implementations::identifier,
))
.on_conflict((implementations::language_id, implementations::identifier))
.do_update()
.set((
implementations::label.eq(&label),
......
......@@ -13,7 +13,7 @@
<a href="/">
<h1>pastebin<small>.run</small></h1>
</a>
<nav id="menu-buttons"><ul><li><a href="https://gitlab.com/pastebin.run/server">Source code</a></li></ul></nav>
<nav id="menu-buttons"><ul><li><a href="https://gitlab.com/pastebinrun/server">Source code</a></li></ul></nav>
</div>
</header>
<article id=article>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment