pastebin/migrations/2019-09-19-100046_c/up.sql
2019-09-19 12:08:17 +02:00

22 lines
851 B
SQL

INSERT INTO implementations (language_id, identifier, label)
SELECT language_id, 'clang', 'Clang'
FROM languages
WHERE identifier = 'c';
INSERT INTO implementations (language_id, identifier, label)
SELECT language_id, 'gcc', 'gcc'
FROM languages
WHERE identifier = 'c';
INSERT INTO implementation_wrappers (implementation_id, identifier, label, code, ordering)
SELECT implementation_id, 'run', 'Run', 'mv code code.c; clang %s code.c && ./a.out', 1
FROM implementations
JOIN languages USING (language_id)
WHERE implementations.identifier = 'clang'
AND languages.identifier = 'c';
INSERT INTO implementation_wrappers (implementation_id, identifier, label, code, ordering)
SELECT implementation_id, 'run', 'Run', 'mv code code.c; gcc %s code.c && ./a.out', 1
FROM implementations
WHERE identifier = 'gcc';