Open rudolph-miller opened 9 years ago
At first, I created table and migrate it.
(defclass tweet () ((id :type bigint :auto-increment t :primary-key t :reader tweet-id) (user :type (varchar 255) :accessor tweet-user)) (:metaclass <dao-table-class>) (:table-name "tweets") (:keys user)) (execute-sql (table-definition 'tweet)
then, I redefined this table to
(defclass tweet () ((id :type bigint :auto-increment t :primary-key t :reader tweet-id) (user :type (varchar 255) :accessor tweet-user)) (:metaclass <dao-table-class>) (:table-name "tweets"))
and
(make-migration-sql (find-class 'tweet)) ;; => NIL
.
I can remove index with giving nothing to :keys
:keys
(defclass tweet () ((id :type bigint :auto-increment t :primary-key t :reader tweet-id) (user :type (varchar 255) :accessor tweet-user)) (:metaclass <dao-table-class>) (:table-name "tweets") (:keys)) (make-migration-sql (find-class 'tweet)) ;; => ("DROP INDEX user ON tweets")
Is this as you expected?
At first, I created table and migrate it.
then, I redefined this table to
and
.
I can remove index with giving nothing to
:keys
Is this as you expected?