Download HSQLDB from its website: [http://hsqldb.org]
Put hsqldb jars into Tomcat library:
cp hsqldb/lib/hsqldb.jar tomcat7/lib/
Edit tomcat7/conf/context.xml
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
Download HSQLDB from its website: [http://hsqldb.org]
Put hsqldb jars into Tomcat library:
cp hsqldb/lib/hsqldb.jar tomcat7/lib/
Edit tomcat7/conf/context.xml
grep -r --color --exclude-dir={custom,lib,scripts} --exclude={*.xml,error_log} "beta" . |
/** | |
* Changes value to past tense. | |
* Simple filter does not support irregular verbs such as eat-ate, fly-flew, etc. | |
* http://jsfiddle.net/bryan_k/0xczme2r/ | |
* | |
* @param {String} value The value string. | |
*/ | |
Vue.filter('past-tense', function(value) { | |
// Slightly follows http://www.oxforddictionaries.com/us/words/verb-tenses-adding-ed-and-ing | |
var vowels = ['a', 'e', 'i', 'o', 'u']; |
@Entity | |
public class Employee { | |
@Id long empId; | |
String empName; | |
... | |
} | |
public class DependentId { | |
String name; // matches name of @Id attribute | |
long emp; // matches name of @Id attribute and type of Employee PK |
sentry
SENTRY_SECRET_KEY
to random 32 char stringdocker-compose up -d
docker-compose exec sentry sentry upgrade
to setup database and create admin userdocker-compose exec sentry pip install sentry-slack
if you want slack plugin, it can be done laterdocker-compose restart sentry
9000
Django allows you to define custom UniqueConstraints
to specify which combinations of values are allowed in a row, but removing these later can be problematic when some ForeignKey
is involved, at least with MySQL it may throw a Cannot drop index '...': needed in a foreign key constraint
at you.
The example below shows you how to resolve such a situation in 3 small individual migrations:
class MyModel(models.Model):
other_model = models.ForeignKey("OtherModel", on_delete=models.CASCADE)
name = models.CharField(max_length=128)