Closed
Bug 989750
Opened 11 years ago
Closed 11 years ago
mysql migration error
Categories
(Air Mozilla :: Other, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: vremendm, Unassigned)
Details
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1521.3 Safari/537.36
Steps to reproduce:
Use mysql backend with MariaDB 10.0.9
run
./manage.py migration
Actual results:
DatabaseError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'USING gin(to_tsvector('english', title));\n\n -- Note, this works without c' at line 3")
Expected results:
successful database migration
This can solve the problem
--- ./airmozilla_diff/airmozilla/main/migrations/0024_main_event_fulltext_indexes.py 2014-03-30 20:27:31.264813898 +0600
+++ ./airmozilla/airmozilla/main/migrations/0024_main_event_fulltext_indexes.py 2014-03-30 20:30:50.894904230 +0600
@@ -9,19 +9,19 @@
def forwards(self, orm):
# You are running PostgresSQL right
- db.execute("""
- CREATE INDEX main_event_title_fts_idx
- ON main_event
- USING gin(to_tsvector('english', title));
-
- -- Note, this works without coalesce() because description and
- -- short_description are both NOT NULL
- CREATE INDEX main_event_desc_fts_idx
- ON main_event
- USING gin(to_tsvector('english', description || ' ' || short_description));
-
- """)
- #db.execute("ALTER TABLE main_event ADD FULLTEXT KEY (description, short_description)")
+ # db.execute("""
+ # CREATE INDEX main_event_title_fts_idx
+ # ON main_event
+ # USING gin(to_tsvector('english', title));
+ #
+ #-- Note, this works without coalesce() because description and
+ #-- short_description are both NOT NULL
+ #CREATE INDEX main_event_desc_fts_idx
+ #ON main_event
+ #USING gin(to_tsvector('english', description || ' ' || short_description));
+ #
+ #""")
+ db.execute("ALTER TABLE main_event ADD FULLTEXT KEY (description, short_description)")
def backwards(self, orm):
db.execute("""
Comment 2•11 years ago
|
||
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•